public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/36685] New: clarify/diagnose use of weak constant
@ 2008-07-01 10:02 algrant at acm dot org
2008-07-01 10:22 ` [Bug c++/36685] " algrant at acm dot org
2008-07-01 11:36 ` joseph at codesourcery dot com
0 siblings, 2 replies; 3+ messages in thread
From: algrant at acm dot org @ 2008-07-01 10:02 UTC (permalink / raw)
To: gcc-bugs
Consider this:
__attribute__((weak)) extern int const K = 7;
int f(void) { return K; }
int a[K];
Assuming the combination of 'weak' and 'const' is legitimate
(and it seems useful enough to allow), the compiler should avoid
the constant-promotion optimization when generating f(), and
should fault a[].
--
Summary: clarify/diagnose use of weak constant
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: algrant at acm dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36685
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-07-01 11:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-01 10:02 [Bug c++/36685] New: clarify/diagnose use of weak constant algrant at acm dot org
2008-07-01 10:22 ` [Bug c++/36685] " algrant at acm dot org
2008-07-01 11:36 ` joseph at codesourcery dot com
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).