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]

c/456: constant expressions constraints



>Number:         456
>Category:       c
>Synopsis:       constant expressions constraints
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          accepts-illegal
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 08 18:26:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Joseph S. Myers
>Release:        2.96
>Organization:
none
>Environment:
System: Linux decomino 2.2.16 #1 Thu Jun 8 00:26:22 UTC 2000 i686 unknown
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
>Description:

GCC fails to diagnose violations of the constraints for constant
expressions, in -std=c89 -pedantic mode, in some cases where they
appear in unevaluated parts of the expression (although it does
diagnose them when evaluated, even if they are accepted as extensions
without -pedantic).  According to the 1990 standard, they must be
diagnosed unless they appear inside sizeof.  (C99 changes this to "a
subexpression that is not evaluated", but there are still
restrictions, albeit in Semantics rather than Constraints and so not
requiring diagnostics, on the operands of such expressions.)

>How-To-Repeat:

See gcc.dg/c90-const-expr-1.c .

>Fix:

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