Synopsis - Issue Tracker

Bug144 Editing

Title Preprocessor goes into infinite loop on #include_next
Created on 2007-05-14.19:32:21 by blindvt, last changed 2008-02-07.02:38:11 by stefan.
assigned to stefan priority urgent
type behavior severity normal
components Cpp parser platform
status closed resolution fixed
depends on superseded by
Add Comment:
File
CC List:? blindvt, hkaiser, stefan

Messages
Author: blindvt Date: 2007-05-14.19:32:15
The attached testcase (simplified from gcc's limits.h usage) goes into an infinite loop with:

$ synopsis -v -d -Wp,profile=1 -p C -I. -Ibaz foobar.c
[snip]
entering ASTTranslator::found_include_directive
 <foobar.h>
leaving ASTTranslator::found_include_directive
entering ASTTranslator::opened_include_file
 /tmp/i/bug/foobar.h(rel=./foobar.h)
leaving ASTTranslator::opened_include_file
entering ASTTranslator::found_include_directive
 <foobar.h>
leaving ASTTranslator::found_include_directive
entering ASTTranslator::opened_include_file
 /tmp/i/bug/foobar.h
leaving ASTTranslator::opened_include_file
/tmp/i/bug/foobar.h(3): fatal error: include files nested too deep: 1024
Error: CppError: /tmp/i/bug/foobar.h:3 : fatal error: include files nested too deep: 1024



gcc gives on this input:
$ make gcc
gcc -nostdinc -I. -Ibaz  -E foobar.c
# 1 "foobar.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "foobar.c"
# 1 "foobar.h" 1


# 1 "./foobar.h" 1


# 1 "baz/foobar.h" 1




# 1 "baz/foobaz.h" 1


# 1 "./foobar.h" 1
# 4 "baz/foobaz.h" 2
# 6 "baz/foobar.h" 2
# 4 "./foobar.h" 2
# 4 "foobar.h" 2
# 2 "foobar.c" 2
Author: blindvt Date: 2007-09-11.18:51:34
I think that this is a bug in wave (tried 1.35.0 and IIRC 1.34.x).
Author: stefan Date: 2008-02-07.02:38:08
As I can't reproduce this with current boost.wave versions (and of course, current Synopsis versions :-) ), I'm closing this issue.
Files
File nameUploaded
synopsis-trunk.bug144.tar.gz blindvt, 2007-05-14.19:32:17
History
Date User Action Args
2007-05-14 19:32:28blindvtcreate
2007-05-14 19:35:04blindvtsetcomponents: + Cpp parser
2007-09-11 18:51:43blindvtsetnosy: + hkaiser
messages: + msg702
2008-02-07 02:38:18stefansetstatus: new
assignedto: (no value)
resolution: (no value)
messages: + msg710
nosy: + stefan