public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/28744]  New: externally_visible attribute not effective with prior declaration of symbol.
@ 2006-08-15 20:01 dwmw2 at infradead dot org
  2006-08-15 20:06 ` [Bug c/28744] " jakub at gcc dot gnu dot org
                   ` (17 more replies)
  0 siblings, 18 replies; 20+ messages in thread
From: dwmw2 at infradead dot org @ 2006-08-15 20:01 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1328 bytes --]

$ cat foo.c
extern char *bar1 __attribute__((externally_visible));
char *bar1;

extern char *bar2 __attribute__((externally_visible));
char *bar2 __attribute__((externally_visible));

extern char *bar3;
char *bar3 __attribute__((externally_visible));

char *bar4 __attribute__((externally_visible));

char *bar5;
extern char *bar5 __attribute__((externally_visible));
 $ gcc -O -fwhole-program -c -o foo.o foo.c
foo.c:1: warning: ‘externally_visible’ attribute have effect only on public
objects
foo.c:4: warning: ‘externally_visible’ attribute have effect only on public
objects
foo.c:13: warning: ‘externally_visible’ attribute have effect only on public
objects
 $ nm -a foo.o | grep bar
00000004 C bar4

All five of these variables ought to be externally visible.
Note -fwhole-program.

Seen with:
(ppc) gcc version 4.1.1 20060525 (Red Hat 4.1.1-1.pr27898)
(ppc->i686) gcc version 4.1.0


-- 
           Summary: externally_visible attribute not effective with prior
                    declaration of symbol.
           Product: gcc
           Version: 4.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dwmw2 at infradead dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28744


^ permalink raw reply	[flat|nested] 20+ messages in thread
[parent not found: <bug-28744-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2012-03-24 22:08 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-15 20:01 [Bug c/28744] New: externally_visible attribute not effective with prior declaration of symbol dwmw2 at infradead dot org
2006-08-15 20:06 ` [Bug c/28744] " jakub at gcc dot gnu dot org
2006-08-15 21:04 ` pinskia at gcc dot gnu dot org
2006-08-15 21:08 ` pinskia at gcc dot gnu dot org
2006-08-15 21:18 ` jakub at gcc dot gnu dot org
2006-08-16 10:23 ` jakub at gcc dot gnu dot org
2006-08-16 13:17 ` jakub at gcc dot gnu dot org
2006-08-16 18:11 ` dwmw2 at infradead dot org
2006-08-17  9:16 ` dwmw2 at infradead dot org
2006-08-17 11:52 ` jakub at gcc dot gnu dot org
2006-08-17 12:20 ` jakub at gcc dot gnu dot org
2006-08-18 11:12 ` dwmw2 at infradead dot org
2006-08-20 12:42 ` hubicka at ucw dot cz
2006-08-20 12:53 ` aldot at gcc dot gnu dot org
2006-08-20 12:59 ` hubicka at ucw dot cz
2006-08-20 13:12 ` hubicka at ucw dot cz
2006-08-20 13:15 ` aldot at gcc dot gnu dot org
2006-10-06 11:45 ` jakub at gcc dot gnu dot org
2008-01-15 18:09 ` alexandre dot nunes at gmail dot com
     [not found] <bug-28744-4@http.gcc.gnu.org/bugzilla/>
2012-03-24 22:10 ` hubicka at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).