[LLVMbugs] [Bug 3349] New: clang rejects apparently valid code

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sun Jan 18 12:00:36 PST 2009


           Summary: clang rejects apparently valid code
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Semantic Analyzer
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: bagnara at cs.unipr.it
                CC: llvmbugs at cs.uiuc.edu, bolzoni at cs.unipr.it

This but was discovered trying to parse diffutils-2.8.1:

$ cat bug.c
struct re_pattern_buffer ignore_regexp;

struct re_pattern_buffer {
  unsigned char *buffer;
$ gcc -Wall -W -c  bug.c
$ icc -w2 -c bug.c
$ clang -w bug.c
bug.c:1:26: error: variable has incomplete type 'struct re_pattern_buffer'
struct re_pattern_buffer ignore_regexp;
1 diagnostic generated.

This code parses OK also with the Comeau C compiler.

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list