Synopsis - Issue Tracker

Bug142 Editing

Title parser goes into infinite loop
Created on 2007-05-09.21:15:20 by blindvt, last changed 2007-05-18.13:59:46 by stefan.
assigned to stefan priority high
type crash severity normal
components C parser platform
status closed resolution fixed
depends on superseded by
Add Comment:
File
CC List:? blindvt, stefan

Messages
Author: blindvt Date: 2007-05-09.21:15:16
consider this input:
----8<----
#include <features.h>
#include <unistd.h>
----8<----

$ synopsis -p C -o /dev/null myinput.c

goes into an infinite loop:
   entering ASTTranslator::add_comments
   leaving ASTTranslator::add_comments
   entering ASTTranslator::update_position
   leaving ASTTranslator::update_position
<ctrl-C>
  leaving ASTTranslator::visit(PT::EnumSpec *)
 leaving ASTTranslator::visit(SimpleDeclaration)
leaving ASTTranslator::translate
Author: admin Date: 2007-05-12.17:17:06
I can't seem to reproduce this.
Can you please attach a preprocessed source ?
Author: blindvt Date: 2007-05-12.17:48:08
$ cat in.c 
#include <features.h>
#include <unistd.h>
$ cat in.c | gcc -P -E -dD -x c - > features-unistd.i

with STDC and STDC_HOSTED uncommented manually is attached.
Author: blindvt Date: 2007-05-13.16:13:52
Reduced testcase:

$ cat features-unistd.i
enum
  {
    _PC_LINK_MAX,
  };
Author: stefan Date: 2007-05-18.13:59:38
Fixed as per rev:1824.
Thanks !
Files
File nameUploaded
features-unistd.i blindvt, 2007-05-12.17:48:10
History
Date User Action Args
2007-05-09 21:15:26blindvtcreate
2007-05-12 17:17:08adminsetstatus: new
assignedto: (no value)
messages: + msg688
nosy: + stefan
2007-05-12 17:48:15blindvtsetfiles: + features-unistd.i
messages: + msg689
2007-05-13 16:13:57blindvtsetmessages: + msg693
2007-05-18 13:59:59stefansetstatus: open
resolution: (no value)
messages: + msg696
bug_type: (no value)