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

           Summary: Allows "typedef auto".
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++0x
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]


Clang incorrectly allows to "typedef" the auto type specifier, which makes it
crash later on.

int main() {
  typedef auto auto_type;
  auto_type t = 0;
}

It crashes on the use of "auto_type", whereas it should have given a diagnostic
at the typedef declaration already. 

0  clang 0x09237f98
Stack dump:
0.      Program arguments: [lots of stuff] main1.cpp 
1.      <eof> parser at end of file
2.      main1.cpp:2:5: LLVM IR generation of declaration 'main'
3.      main1.cpp:2:5: Generating code for declaration 'main'
4.      main1.cpp:2:12: LLVM IR generation of compound statement ('{}')
clang: error: unable to execute command: Segmentation fault
clang: error: clang frontend command failed due to signal 1 (use -v to see
invocation)

-- 
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to