This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c/5675: const variables wrongly considered part of constant expressions



>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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]