[LLVMbugs] [Bug 3350] New: clang rejects valid code involving va_end

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sun Jan 18 12:25:44 PST 2009


           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: unassignedclangbugs at nondot.org
        ReportedBy: bagnara at cs.unipr.it
                CC: llvmbugs at cs.uiuc.edu, bolzoni at cs.unipr.it

This bug was discovered trying to parse coreutils-6.12:

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

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.

More information about the llvm-bugs mailing list