This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

fix missing extern


I usually bootstrap with -fno-common, because the resulting
code is a bit more efficient on Alpha.  About every month or
so, someone forgets an "extern".

I've decided to nip this in the bud and add -fno-common to the
set of flags with which we bootstrap gcc.  Thus the next person
to forget an extern will be treated to a link error.


r~


        * Makefile.in (LOOSE_WARN): Add -fno-common.
        * c-common.h (constant_string_class_name): Add missing extern.

Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.933
diff -c -p -d -u -r1.933 Makefile.in
--- Makefile.in	13 Aug 2002 23:11:37 -0000	1.933
+++ Makefile.in	14 Aug 2002 23:57:42 -0000
@@ -88,7 +88,7 @@ coverageexts = .{da,bb,bbg}
 # apply to the back end and the C front end, which may be compiled
 # with other compilers.  This is partially controlled by configure in
 # stage1, as not all versions of gcc understand -Wno-long-long.
-LOOSE_WARN = -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
+LOOSE_WARN = -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -fno-common
 STRICT_WARN = -Wtraditional @strict1_warn@
 STRICT2_WARN = -Wtraditional -pedantic -Wno-long-long
 
Index: c-common.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-common.h,v
retrieving revision 1.152
diff -c -p -d -u -r1.152 c-common.h
--- c-common.h	12 Aug 2002 06:02:52 -0000	1.152
+++ c-common.h	14 Aug 2002 23:58:02 -0000
@@ -606,7 +606,7 @@ extern int print_struct_values;
 
 /* ???.  Undocumented.  */
 
-const char *constant_string_class_name;
+extern const char *constant_string_class_name;
 
 /* Warn if multiple methods are seen for the same selector, but with
    different argument types.  */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]