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/945: Preprocessor errors for long long integer constants under wrong conditions



>Number:         945
>Category:       c
>Synopsis:       Preprocessor errors for long long integer constants under wrong conditions
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 30 11:36:01 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Joseph S. Myers
>Release:        2.97 20001129 (experimental)
>Organization:
none
>Environment:
System: Linux decomino 2.2.17 #1 Mon Sep 4 20:22:16 UTC 2000 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/snapshot --disable-shared --enable-threads=posix --with-system-zlib
>Description:

GCC gives preprocessor errors for the use of LL-suffixed integer
constants in #if expressions under the wrong conditions.  The correct
rules, following the definitions of the relevant command line options,
are:

* -std=c89 or -std=gnu89 without -pedantic, accept silently.

* -std=c89 or -std=gnu89 with -pedantic, warning (not error).

* -std=c89 or -std=gnu89 with -pedantic-errors, error.

* -std=iso9899:199409, as -std=c89.

* C99 mode, accept regardless of pedantic setting.

At present, it is wrongly the use of -std=c89 which turns on errors
for this usage.

>How-To-Repeat:

Preprocess

	#if 1LL
	foo
	#endif

with different command line options.

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