c-common.c: Move format checking code to ...

* c-common.c: Move format checking code to ...
	* c-format.c: ... here.  New file.  Reorder some functions and
	declarations.
	(decl_handle_format_attribute, decl_handle_format_arg_attribute):
	New functions.
	* c-common.h (decl_handle_format_attribute,
	decl_handle_format_arg_attribute): Declare.
	* Makefile.in (C_AND_OBJC_OBJS): Add c-format.o.
	(c-common.o): Adjust dependencies.
	(c-format.o): New list of dependencies.

cp:
	* Make-lang.in (CXX_C_OBJS): Add c-format.o.

From-SVN: r38998
This commit is contained in:
Joseph Myers 2001-01-13 23:30:02 +00:00 committed by Joseph Myers
parent 6f6684e699
commit 1312c143f8
7 changed files with 2537 additions and 2457 deletions

View File

@ -1,3 +1,16 @@
2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
* c-common.c: Move format checking code to ...
* c-format.c: ... here. New file. Reorder some functions and
declarations.
(decl_handle_format_attribute, decl_handle_format_arg_attribute):
New functions.
* c-common.h (decl_handle_format_attribute,
decl_handle_format_arg_attribute): Declare.
* Makefile.in (C_AND_OBJC_OBJS): Add c-format.o.
(c-common.o): Adjust dependencies.
(c-format.o): New list of dependencies.
2001-01-13 Jakub Jelinek <jakub@redhat.com> 2001-01-13 Jakub Jelinek <jakub@redhat.com>
* unroll.c (loop_iterations): If we cannot prove iteration variable * unroll.c (loop_iterations): If we cannot prove iteration variable

View File

@ -725,8 +725,8 @@ CXX_TARGET_OBJS=@cxx_target_objs@
# Language-specific object files for C and Objective C. # Language-specific object files for C and Objective C.
C_AND_OBJC_OBJS = c-errors.o c-lex.o c-pragma.o c-decl.o c-typeck.o \ C_AND_OBJC_OBJS = c-errors.o c-lex.o c-pragma.o c-decl.o c-typeck.o \
c-convert.o c-aux-info.o c-common.o c-semantics.o c-dump.o libcpp.a \ c-convert.o c-aux-info.o c-common.o c-format.o c-semantics.o c-dump.o \
$(C_TARGET_OBJS) libcpp.a $(C_TARGET_OBJS)
# Language-specific object files for C. # Language-specific object files for C.
C_OBJS = c-parse.o c-lang.o $(C_AND_OBJC_OBJS) C_OBJS = c-parse.o c-lang.o $(C_AND_OBJC_OBJS)
@ -1230,7 +1230,10 @@ s-under: $(GCC_PASSES)
c-common.o : c-common.c $(CONFIG_H) system.h $(TREE_H) $(OBSTACK_H) \ c-common.o : c-common.c $(CONFIG_H) system.h $(TREE_H) $(OBSTACK_H) \
$(C_COMMON_H) flags.h toplev.h output.h c-pragma.h $(RTL_H) $(GGC_H) \ $(C_COMMON_H) flags.h toplev.h output.h c-pragma.h $(RTL_H) $(GGC_H) \
$(EXPR_H) diagnostic.h $(EXPR_H)
c-format.o : c-format.c $(CONFIG_H) system.h $(TREE_H) \
$(C_COMMON_H) flags.h toplev.h intl.h diagnostic.h
c-semantics.o : c-semantics.c $(CONFIG_H) system.h $(TREE_H) $(C_TREE_H) \ c-semantics.o : c-semantics.c $(CONFIG_H) system.h $(TREE_H) $(C_TREE_H) \
c-lex.h flags.h toplev.h output.h c-pragma.h $(RTL_H) $(GGC_H) \ c-lex.h flags.h toplev.h output.h c-pragma.h $(RTL_H) $(GGC_H) \

File diff suppressed because it is too large Load Diff

View File

@ -478,6 +478,8 @@ extern void decl_attributes PARAMS ((tree, tree, tree));
extern void init_function_format_info PARAMS ((void)); extern void init_function_format_info PARAMS ((void));
extern void check_function_format PARAMS ((int *, tree, tree, tree)); extern void check_function_format PARAMS ((int *, tree, tree, tree));
extern void set_Wformat PARAMS ((int)); extern void set_Wformat PARAMS ((int));
extern void decl_handle_format_attribute PARAMS ((tree, tree));
extern void decl_handle_format_arg_attribute PARAMS ((tree, tree));
extern void c_apply_type_quals_to_decl PARAMS ((int, tree)); extern void c_apply_type_quals_to_decl PARAMS ((int, tree));
/* Print an error message for invalid operands to arith operation CODE. /* Print an error message for invalid operands to arith operation CODE.
NOP_EXPR is used as a special case (see truthvalue_conversion). */ NOP_EXPR is used as a special case (see truthvalue_conversion). */

2507
gcc/c-format.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,7 @@
2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
* Make-lang.in (CXX_C_OBJS): Add c-format.o.
2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk> 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
* g++.1: Change to be ".so man1/gcc.1". * g++.1: Change to be ".so man1/gcc.1".

View File

@ -90,7 +90,7 @@ $(DEMANGLER_PROG): cxxmain.o underscore.o $(LIBDEPS)
# The compiler itself. # The compiler itself.
# Shared with C front end: # Shared with C front end:
CXX_C_OBJS = c-common.o c-pragma.o c-semantics.o c-lex.o c-dump.o $(CXX_TARGET_OBJS) CXX_C_OBJS = c-common.o c-format.o c-pragma.o c-semantics.o c-lex.o c-dump.o $(CXX_TARGET_OBJS)
# Language-specific object files. # Language-specific object files.
CXX_OBJS = cp/call.o cp/decl.o cp/errfn.o cp/expr.o cp/pt.o cp/typeck2.o \ CXX_OBJS = cp/call.o cp/decl.o cp/errfn.o cp/expr.o cp/pt.o cp/typeck2.o \