c/5675: const variables wrongly considered part of constant expressions
Joseph Myers
jsm28@cam.ac.uk
Tue Feb 12 15:26:00 GMT 2002
>Number: 5675
>Category: c
>Synopsis: const variables wrongly considered part of constant expressions
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: accepts-illegal
>Submitter-Id: net
>Arrival-Date: Tue Feb 12 13:46:02 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Joseph S. Myers
>Release: 3.1 20020212 (experimental)
>Organization:
none
>Environment:
System: Linux digraph 2.2.20 #2 Sat Nov 10 16:44:22 UTC 2001 i686 unknown
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc-cvs/configure --prefix=/opt/gcc/mainline --disable-shared --enable-threads=posix --with-system-zlib
>Description:
In some circumstances, GCC wrongly accepts const variables as part of
constant expressions when compiling C.
>How-To-Repeat:
The XFAILing tests in gcc.dg/c9[09]-const-expr-3.c.
>Fix:
Fixing the underlying problems associated with
decl_constant_value_for_broken_optimization, moving such optimizations
until after all constraint checking, might help. Or keep proper track
for every subexpression of whether it is a constant expression (see
also c/456).
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list