[Bug c++/36685] New: clarify/diagnose use of weak constant
algrant at acm dot org
gcc-bugzilla@gcc.gnu.org
Tue Jul 1 10:02:00 GMT 2008
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
More information about the Gcc-bugs
mailing list