This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
preprocessor/3487: unrecognized token before #include points to wrong source
- To: gcc-gnats at gcc dot gnu dot org, debian-gcc at lists dot debian dot org
- Subject: preprocessor/3487: unrecognized token before #include points to wrong source
- From: Matthias Klose <doko at klose dot in-berlin dot de>
- Date: Sat, 30 Jun 2001 10:48:07 +0200
- Reply-To: 85908-quiet at bugs dot debian dot org
>Number: 3487
>Category: preprocessor
>Synopsis: unrecognized token before #include points to wrong source
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jun 30 01:56:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Jim Bray <jb@cs.wcu.edu>
>Release: 3.0 (Debian GNU/Linux)
>Organization:
The Debian project
>Environment:
System: Debian GNU/Linux (testing/unstable)
Architecture: i686
host: i386-linux
build: i386-linux
target: i386-linux
configured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,objc --prefix=/usr --infodir=/share/info --mandir=/share/man --enable-shared --with-gnu-as --with-gnu-ld --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-checking --enable-threads=posix --enable-java-gc=boehm --with-cpp-install-dir=bin --enable-objc-gc i386-linux
>Description:
[ Reported to the Debian BTS as report #85908.
Please CC 85908-quiet@bugs.debian.org on replies.
Log of report can be found at http://bugs.debian.org/85908 ]
unrecognized tokens before an include file point to the wrong file in
the error message.
--- begin
RandomGarbage
#include <stddef.h>
int main()
{
}
--- end
In file included from bug-85908.c:2:
/usr/lib/gcc-lib/i386-linux/3.0/include/stddef.h:147: syntax error before "typedef"
If there is more than one token ('Random Garbage'), the error message point to the correct position:
bug-85908.c:1: parse error before "Garbage"
In file included from bug-85908.c:2:
/usr/lib/gcc-lib/i386-linux/3.0/include/stddef.h:147: syntax error before "typedef"
So the bug submitter wants this message for exactly one unrecognized
token as well (point to the bug-85908.c file)
Preprocessed source is:
# 1 "bug-85908.c"
RandomGarbage
# 1 "/usr/lib/gcc-lib/i386-linux/3.0/include/stddef.h" 1 3
# 147 "/usr/lib/gcc-lib/i386-linux/3.0/include/stddef.h" 3
typedef int ptrdiff_t;
# 199 "/usr/lib/gcc-lib/i386-linux/3.0/include/stddef.h" 3
typedef unsigned int size_t;
# 287 "/usr/lib/gcc-lib/i386-linux/3.0/include/stddef.h" 3
typedef long int wchar_t;
# 3 "bug-85908.c" 2
int main()
{
}
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: