[LLVMbugs] [Bug 17824] New: Misparsing typedef when using -fms-extensions

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Nov 5 14:05:51 PST 2013


http://llvm.org/bugs/show_bug.cgi?id=17824

            Bug ID: 17824
           Summary: Misparsing typedef when using -fms-extensions
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jeremy at goop.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Current clang trunk misparses a "typedef union" when using -fms-extensions:

$ cat t.c
typedef union
  {
    union wait *__uptr;
    int *__iptr;
  } __WAIT_STATUS __attribute__ ((__transparent_union__));
$ clang -v
clang version 3.4 (trunk 194026)
Target: x86_64-unknown-linux-gnu
Thread model: posix
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.4.6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.5.3
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6.2
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6.3
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6
$ clang -c t.c
$ clang -c t.c -fms-extensions
t.c:3:23: error: expected member name or ';' after declaration specifiers
    union wait *__uptr;
    ~~~~~             ^
1 error generated.

Removing the "__attribute__ ((__transparent_union__))" makes no difference.

gcc 4.6.3 compiles all these without complaint, as does clang 3.3.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20131105/de5b625d/attachment.html>


More information about the llvm-bugs mailing list