This is the mail archive of the gcc-bugs@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]

preprocessor/6386: Spurious "unterminated #if"



>Number:         6386
>Category:       preprocessor
>Synopsis:       Spurious "unterminated #if"
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Sat Apr 20 14:26:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        3.1 20020415 (prerelease)
>Organization:
>Environment:
System: Linux sykes 2.4.18-SMP #1 SMP Sat Apr 13 18:56:25 UTC 2002 ia64 unknown
Architecture: ia64

	
host: ia64-suse-linux-gnu
build: ia64-suse-linux-gnu
target: ia64-suse-linux-gnu
configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --enable-languages=c,c++,f77,objc,java,ada --with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib --with-system-zlib --enable-shared --libdir=/usr/lib --enable-checking ia64-suse-linux
>Description:
A function-like macro used in non-function context at the end of an
include file that was included inside #if/#endif pair confuses the
preprocessor.
>How-To-Repeat:
$ cat a.c
#define S(x)
#if 1
#include "b.c"
#endif
$ cat b.c
S
$ gcc -E a.c
# 1 "a.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "a.c"


# 1 "b.c" 1
S
# 4 "a.c" 2
a.c:2:1: unterminated #if
>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]