bug on mainline
Richard Henderson
rth@twiddle.net
Sun Mar 3 00:55:00 GMT 2002
On Sun, Mar 03, 2002 at 12:33:23AM -0800, Richard Henderson wrote:
> But the patch was supposed to generate proper bss symbols,
> not common symbols. Poke Kaveh for a start; I'll look at
> it if he doesn't take care of it.
Nevermind, I found it anyway.
r~
Index: c-decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-decl.c,v
retrieving revision 1.303
diff -u -p -r1.303 c-decl.c
--- c-decl.c 2002/02/28 13:29:47 1.303
+++ c-decl.c 2002/03/03 08:54:38
@@ -3476,7 +3476,7 @@ start_decl (declarator, declspecs, initi
initializer equal to zero. (Section 3.7.2)
-fno-common gives strict ANSI behavior. Usually you don't want it.
This matters only for variables with external linkage. */
- if (! flag_no_common || ! TREE_PUBLIC (decl))
+ if (!initialized && (! flag_no_common || ! TREE_PUBLIC (decl)))
DECL_COMMON (decl) = 1;
/* Set attributes here so if duplicate decl, will have proper attributes. */
More information about the Libc-hacker
mailing list