[LLVMbugs] [Bug 2692] New: error: first argument to 'va_arg' is of type 'va_list' and not 'va_list'

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue Aug 19 23:29:11 PDT 2008


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

           Summary: error: first argument to 'va_arg' is of type 'va_list'
                    and not 'va_list'
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Semantic Analyzer
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: edwintorok at gmail.com
                CC: llvmbugs at cs.uiuc.edu


Using LLVM SVN r55039 (and same clang revision), when I compile the following
code I get an error:
#include <stdarg.h>
static char *f (char * (*g) (char **, int), char **p, ...)
{
  char *s;
  va_list v;
  va_start (v,p);
  s = g (p, va_arg (v,int));
  va_end (v);
  return s;
}

$ clang clang_bug.c
clang_bug.c:7:13: error: first argument to 'va_arg' is of type 'va_list' and
not 'va_list'
  s = g (p, va_arg (v,int));
            ^~~~~~
1 diagnostic generated.

This code is part of a configure test, and I noticed it only because now
scan_build creates a list of files that failed to compile, and conftest.c was
among them.


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