c/10439: A small standard non-conformance

be9-ml@be9.ru be9-ml@be9.ru
Sat Apr 19 11:06:00 GMT 2003


>Number:         10439
>Category:       c
>Synopsis:       A small standard non-conformance
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Apr 19 11:06:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     be9-ml@be9.ru
>Release:        gcc-2.95.4, gcc-3.2.1
>Organization:
>Environment:
2.95.4 under FreeBSD 4.8-STABLE
3.2.1 under Linux (ALTLinux Junior 2.2)
>Description:
Well, the standard says that the comma operator in C always results in an r-value even if its right operand is an l-value. The following code is invalid though it compiles
under gcc even with -ansi switch

int i;
int j;

(i, j) = 1;     // Invalid C
>How-To-Repeat:
Just compile it :-)
>Fix:
?
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-prs mailing list