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

           Summary: crash on redefinition of builtin
           Product: clang
           Version: unspecified
          Platform: All
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Semantic Analyzer
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
                CC: [email protected]


clang asserts on the following input:
--
void __builtin_object_size();

int a[10];

int f0() {
  return __builtin_object_size(&a); // expected-error {{too few arguments to
function}}
}
--
this is because although we emit an error on the redefinition of the builtin,
we continue parsing. However, the builtin code which hand checks builtin object
size expects the number of arguments to have already been checked.

Its not clear what the right fix is. Its easy to fix in the builtin code,
however, it is also nice to rely on builtins always obeying certain invariants.
Perhaps we should disallow redefinition of builtins?


-- 
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