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

           Summary: clang rejects valid code involving va_end
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Semantic Analyzer
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]


This bug was discovered trying to parse coreutils-6.12:

$ cat bug.c
#include <stdarg.h>

void
foo(const char *command_name, va_list authors) {
  (void) command_name;
  va_end (authors);
}
$ gcc -c -W -Wall bug.c
$ icc -c bug.c
$ clang bug.c
bug.c:6:3: error: incompatible type passing 'struct __va_list_tag *', expected
'__builtin_va_list &'
  va_end (authors);
  ^~~~~~
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to