gcc2 merge

Kaveh R. Ghazi ghazi@caip.rutgers.edu
Thu Jan 28 07:02:00 GMT 1999


 > From: Jeffrey A Law <law@hurl.cygnus.com>
 > 
 > I've just checked in the long delayed merge from gcc2 snapshot 980929.
 > 
 > The major change brought over in this merge is the initial i18n support for
 > gcc.
 > 
 > It is possible this merge will introduce some short term instability.  I'm
 > going to run through a matrix of builds again starting tomorrow night (-O0,
 > -O2, -O9) to try and sweep out any dusty corners.
 > jeff

	Briefly looking over the changes, it looks like some bogus
stuff creeped in.

1.  I think I disagree with putting the PRINTF_PROTO_* stuff go into
system.h.  It was only used by cccp.c and cexp.y and it got nuked from
cccp.c.  I think we should deprecate this form and we should be using
the "PVPROTO ((...)) ATTRIBUTE_PRINTF" style instead.  This is a cleanup
issue, not a serous problem though. 

2.  However, when PRINTF_PROTO_* was removed from cccp.c, the vararg
prototypes in that file no longer will get __attribute__ ((__printf__)). 
So they must have ATTRIBUTE_PRINTF_* added to their prototypes or no
format checks are done. 

3.  All the vararg prototypes in cccp.c incorrectly switched from
PRINTF_PROTO_* to VPROTO.  This is completely wrong since VPROTO is only
valid on function _definitions_ not prototype declarations.  One must
use PVPROTO in prototypes.  This mistake causes a bootstrap failure for
any stage1 compiler which doesn't default to ANSI.  I.e. OSF4 cc and
SunOS4 cc. 

	I'll see about making a patch, but in the mean time, here is
the output from OSF4 cc.

		--Kaveh


 > cc -DIN_GCC -DHAIFA -g -DHAVE_CONFIG_H -I. -I. -I./config
 >   -I./../include
 >   -DGCC_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/alphaev5-dec-osf4.0b/egcs-2.93.03/include\"
 >   -DGPLUSPLUS_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/alphaev5-dec-osf4.0b/egcs-2.93.03/../../../..`echo
 >   /usr/local | sed -e 's|^/usr/local||' -e 's|/[^/]*|/..|g'`/include/g++-2\"
 >   -DLOCAL_INCLUDE_DIR=\"/usr/local/include\"
 >   -DCROSS_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/alphaev5-dec-osf4.0b/egcs-2.93.03/../../../../alphaev5-dec-osf4.0b/sys-include\"
 >   -DTOOL_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/alphaev5-dec-osf4.0b/egcs-2.93.03/../../../../alphaev5-dec-osf4.0b/include\"
 >   -c `echo ./cccp.c | sed 's,^\./,,'`
 > cc: Error: cccp.c, line 988: Missing "{".
 > static void notice VPROTO((char *, ...));
 > ----------------------------------------^
 > cc: Error: cccp.c, line 989: Invalid statement.
 > static void vnotice PROTO((char *, va_list));
 > ^
 > cc: Error: cccp.c, line 990: Invalid statement.
 > void error VPROTO((char *, ...));
 > ^
 > cc: Error: cccp.c, line 991: Invalid statement.
 > void verror PROTO((char *, va_list));
 > ^
 > cc: Error: cccp.c, line 992: Invalid statement.
 > static void error_from_errno PROTO((char *));
 > ^
 > cc: Error: cccp.c, line 993: Invalid statement.
 > void warning VPROTO((char *, ...));
 > ^
 > cc: Error: cccp.c, line 994: Invalid statement.
 > static void vwarning PROTO((char *, va_list));
 > ^
 > cc: Error: cccp.c, line 995: Invalid statement.
 > static void error_with_line VPROTO((int, char *, ...));
 > ^
 > cc: Error: cccp.c, line 996: Invalid statement.
 > static void verror_with_line PROTO((int, char *, va_list));
 > ^
 > cc: Error: cccp.c, line 997: Invalid statement.
 > static void vwarning_with_line PROTO((int, char *, va_list));
 > ^
 > cc: Error: cccp.c, line 998: Invalid statement.
 > static void warning_with_line VPROTO((int, char *, ...));
 > ^
 > cc: Error: cccp.c, line 999: Invalid statement.
 > void pedwarn VPROTO((char *, ...));
 > ^
 > cc: Error: cccp.c, line 1000: Invalid statement.
 > void pedwarn_with_line VPROTO((int, char *, ...));
 > ^
 > cc: Error: cccp.c, line 1001: Invalid statement.
 > static void pedwarn_with_file_and_line VPROTO((char *, size_t, int, char *, ...));
 > ^
 > cc: Error: cccp.c, line 1002: Invalid statement.
 > static void pedwarn_strange_white_space PROTO((int));
 > ^
 > cc: Error: cccp.c, line 1004: Invalid statement.
 > static void print_containing_files PROTO((void));
 > ^
 > cc: Error: cccp.c, line 1006: Invalid statement.
 > static int line_for_error PROTO((int));
 > ^
 > cc: Error: cccp.c, line 1007: Invalid statement.
 > static int grow_outbuf PROTO((FILE_BUF *, int));
 > ^
 > cc: Error: cccp.c, line 1009: Invalid statement.
 > static HASHNODE *install PROTO((U_CHAR *, int, enum node_type, char *, int));
 > ^
 > cc: Error: cccp.c, line 1011: Invalid statement.
 > static void delete_macro PROTO((HASHNODE *));
 > ^
 > cc: Error: cccp.c, line 1012: Invalid statement.
 > static int hashf PROTO((U_CHAR *, int, int));
 > ^
 > cc: Error: cccp.c, line 1014: Invalid statement.
 > static void dump_single_macro PROTO((HASHNODE *, FILE *));
 > ^
 > cc: Error: cccp.c, line 1015: Invalid statement.
 > static void dump_all_macros PROTO((void));
 > ^
 > cc: Error: cccp.c, line 1016: Invalid statement.
 > static void dump_defn_1 PROTO((U_CHAR *, int, int, FILE *));
 > ^
 > cc: Error: cccp.c, line 1017: Invalid statement.
 > static void dump_arg_n PROTO((DEFINITION *, int, FILE *));
 > ^
 > cc: Error: cccp.c, line 1019: Invalid statement.
 > static void initialize_char_syntax PROTO((void));
 > ^
 > cc: Error: cccp.c, line 1020: Invalid statement.
 > static void initialize_builtins PROTO((FILE_BUF *, FILE_BUF *));
 > ^
 > cc: Error: cccp.c, line 1022: Invalid statement.
 > static void make_definition PROTO((char *));
 > ^
 > cc: Error: cccp.c, line 1023: Invalid statement.
 > static void make_undef PROTO((char *, FILE_BUF *));
 > ^
 > cc: Error: cccp.c, line 1025: Invalid statement.
 > static void make_assertion PROTO((char *, char *));
 > ^
 > cc: Error: cccp.c, line 1027: Invalid statement.
 > static struct file_name_list *new_include_prefix PROTO((struct file_name_list *, const char *, const char *, const char *));
 > ^
 > cc: Error: cccp.c, line 1028: Invalid statement.
 > static void append_include_chain PROTO((struct file_name_list *, struct file_name_list *));
 > ^
 > cc: Error: cccp.c, line 1030: Invalid statement.
 > static int quote_string_for_make PROTO((char *, char *));
 > ^
 > cc: Error: cccp.c, line 1031: Invalid statement.
 > static void deps_output PROTO((char *, int));
 > ^
 > cc: Error: cccp.c, line 1033: Invalid statement.
 > static void fatal VPROTO((char *, ...)) __attribute__ ((noreturn));
 > ^
 > cc: Error: cccp.c, line 1034: Invalid statement.
 > void fancy_abort PROTO((void)) __attribute__ ((noreturn));
 > ^
 > cc: Error: cccp.c, line 1035: Invalid statement.
 > static void perror_with_name PROTO((char *));
 > ^
 > cc: Error: cccp.c, line 1036: Invalid statement.
 > static void pfatal_with_name PROTO((char *)) __attribute__ ((noreturn));
 > ^
 > cc: Error: cccp.c, line 1037: Invalid statement.
 > static void pipe_closed PROTO((int)) __attribute__ ((noreturn));
 > ^
 > cc: Error: cccp.c, line 1039: Invalid statement.
 > static void memory_full PROTO((void)) __attribute__ ((noreturn));
 > ^
 > cc: Error: cccp.c, line 1040: Invalid statement.
 > static void print_help PROTO((void));
 > ^
 > cc: Error: cccp.c, line 1048: Invalid statement.
 > static int
 > ^
 > cc: Error: cccp.c, line 1051: Invalid statement.
 >      char *ptr;
 > -----^
 > cc: Error: cccp.c, line 1052: Invalid statement.
 >      int len;
 > -----^
 > cc: Error: cccp.c, line 1084: Invalid statement.
 > static void
 > ^
 > cc: Error: cccp.c, line 1087: Invalid statement.
 >      char *ptr;
 > -----^
 > cc: Error: cccp.c, line 1088: Invalid statement.
 >      int len;
 > -----^
 > cc: Error: cccp.c, line 1119: Invalid statement.
 > static void
 > ^
 > cc: Error: cccp.c, line 1122: Missing ";".
 >      size_t length;
 > ------------^
 > cc: Error: cccp.c, line 1140: Invalid statement.
 > static void
 > ^
 > cc: Error: cccp.c, line 1210: Invalid statement.
 > int
 > ^
 > cc: Error: cccp.c, line 1213: Invalid statement.
 >      char **argv;
 > -----^
 > cc: Error: cccp.c, line 2343: Invalid statement.
 > static void
 > ^
 > cc: Error: cccp.c, line 2380: Invalid statement.
 > static U_CHAR *
 > ^
 > cc: Error: cccp.c, line 2383: Invalid statement.
 >      int c;
 > -----^
 > cc: Error: cccp.c, line 2384: Missing ";".
 >      size_t n;
 > ------------^
 > cc: Error: cccp.c, line 2411: Invalid statement.
 > static void
 > ^
 > cc: Error: cccp.c, line 2485: Invalid statement.
 > static void
 > ^
 > cc: Error: cccp.c, line 2518: Invalid statement.
 > static void
 > ^
 > cc: Error: cccp.c, line 2557: Invalid statement.
 > static char *
 > ^
 > cc: Error: cccp.c, line 2560: Invalid statement.
 >      register U_CHAR *limit;
 > -----^
 > cc: Error: cccp.c, line 2562: Invalid statement.
 >      int *arglen, *cmdlen;	/* how long they are */
 > -----^
 > cc: Error: cccp.c, line 2638: Invalid statement.
 > static void
 > ^
 > cc: Error: cccp.c, line 2641: Invalid statement.
 >      int output_marks;
 > -----^
 > cc: Error: cccp.c, line 3707: Invalid statement.
 > static FILE_BUF
 > ^
 > cc: Error: cccp.c, line 3710: Invalid statement.
 >      int output_marks, assertions;
 > -----^
 > cc: Error: cccp.c, line 3797: Invalid statement.
 > static int
 > ^
 > cc: Error: cccp.c, line 4218: Invalid statement.
 > static struct tm *
 > ^
 > cc: Error: cccp.c, line 4229: Invalid statement.
 > static char *monthnames[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun",
 > ^
 > cc: Error: cccp.c, line 4231: Invalid expression.
 > 			    };
 > ----------------------------^
 > cc: Error: cccp.c, line 4238: Invalid statement.
 > static void
 > ^
 > cc: Error: cccp.c, line 4422: Invalid statement.
 > static int
 > ^
 > cc: Error: cccp.c, line 4426: Invalid statement.
 >      struct directive *keyword;
 > -----^
 > cc: Error: cccp.c, line 4873: Invalid statement.
 > static int
 > ^
 > cc: Error: cccp.c, line 4888: Invalid statement.
 > static char *
 > ^
 > cc: Error: cccp.c, line 4913: Invalid statement.
 > static int
 > ^
 > cc: Error: cccp.c, line 4942: Invalid statement.
 > static size_t
 > ^
 > cc: Error: cccp.c, line 5012: Invalid statement.
 > struct file_name_map
 > ^
 > cc: Error: cccp.c, line 5024: Invalid statement.
 > static char *
 > ^
 > cc: Error: cccp.c, line 5057: Invalid statement.
 > static struct file_name_map *
 > ^
 > cc: Error: cccp.c, line 5153: Invalid statement.
 > static int
 > ^
 > cc: Error: cccp.c, line 5156: Invalid statement.
 >      struct file_name_list *searchptr;
 > -----^
 > cc: Error: cccp.c, line 5158: Invalid statement.
 >      struct include_file **pinc;
 > -----^
 > cc: Error: cccp.c, line 5231: Invalid statement.
 > static char *
 > ^
 > cc: Error: cccp.c, line 5234: Invalid statement.
 >      struct file_name_list *searchptr;
 > -----^
 > cc: Error: cccp.c, line 5279: Invalid statement.
 > static int
 > ^
 > cc: Error: cccp.c, line 5307: Invalid statement.
 > static void
 > ^
 > cc: Error: cccp.c, line 5310: Invalid statement.
 >      struct include_file *inc;
 > -----^
 > cc: Error: cccp.c, line 5312: Invalid statement.
 >      int system_header_p;
 > -----^
 > cc: Error: cccp.c, line 5313: Invalid statement.
 >      struct file_name_list *dirptr;
 > -----^
 > cc: Error: cccp.c, line 5420: Invalid statement.
 > static void
 > ^
 > cc: Error: cccp.c, line 5441: Invalid statement.
 > static char *
 > ^
 > cc: Error: cccp.c, line 5444: Invalid statement.
 >      struct stat *st;
 > -----^
 > cc: Error: cccp.c, line 5445: Invalid statement.
 >      char *fname ATTRIBUTE_UNUSED;
 > -----^
 > cc: Error: cccp.c, line 5446: Invalid statement.
 >      char **limit;
 > -----^
 > cc: Error: cccp.c, line 5497: Invalid statement.
 > static int 
 > ^
 > cc: Error: cccp.c, line 5557: Invalid statement.
 > static void
 > ^
 > cc: Error: cccp.c, line 5673: Invalid statement.
 > static void
 > ^
 > cc: Error: cccp.c, line 5687: Invalid statement.
 > static void
 > ^
 > cc: Error: cccp.c, line 5740: Invalid statement.
 > static void
 > ^
 > cc: Error: cccp.c, line 5744: Invalid statement.
 >      struct directive *keyword;
 > -----^
 > cc: Error: cccp.c, line 5744: More than 100 errors were encountered in the course of compilation.
 >      struct directive *keyword;
 > -----^
 > make[2]: *** [cccp.o] Error 1
--
Kaveh R. Ghazi			Engagement Manager / Project Services
ghazi@caip.rutgers.edu		Icon CMT Corp.



More information about the Gcc-patches mailing list