public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/33437]  New: potentially valid construct rejected
@ 2007-09-14 15:25 jbeulich at novell dot com
  2008-11-15  0:45 ` [Bug target/33437] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 3+ messages in thread
From: jbeulich at novell dot com @ 2007-09-14 15:25 UTC (permalink / raw)
  To: gcc-bugs

extern char x[] __attribute__((__weak__));
int i = (long)x;

results in 'initializer element is not computable at load time'. However, the
compiler really can't know this, as x may be either zero (since it's weak) or
may be used as C-level place holder for an assembler/linker defined absolute
symbol. While emitting a warning here (that should have a control for
suppressing) seems appropriate, failing the compilation isn't - that decision
should be left to the assembler (in case the target doesn't have an
appropriately sized relocation type) or the linker.


-- 
           Summary: potentially valid construct rejected
           Product: gcc
           Version: 4.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jbeulich at novell dot com
 GCC build triplet: x86_64-linux-gnu
  GCC host triplet: x86_64-linux-gnu
GCC target triplet: x86_64-linux-gnu


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-10  8:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-33437-4@http.gcc.gnu.org/bugzilla/>
2021-08-09  4:58 ` [Bug target/33437] potentially valid construct rejected pinskia at gcc dot gnu.org
2021-08-10  8:04 ` jbeulich at suse dot com
2007-09-14 15:25 [Bug c/33437] New: " jbeulich at novell dot com
2008-11-15  0:45 ` [Bug target/33437] " pinskia at gcc dot gnu dot 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).