-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillaclang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"
Description
| Bugzilla Link | 3075 |
| Resolution | FIXED |
| Resolved on | Mar 12, 2010 00:57 |
| Version | unspecified |
| OS | NetBSD |
| Reporter | LLVM Bugzilla Contributor |
Extended Description
#include <stdarg.h>
#include <stdio.h>
void foo (const char *msg, ...)
{
va_list ap;
va_start (ap, msg);
vfprintf (stderr, msg, ap);
va_end (ap);
}
gives:
$ clang /tmp/stdarg.c
/tmp/stdarg.c:8:3: warning: passing 'char const *' discards qualifiers, expected '__builtin_va_list'
va_start (ap, msg);
^~~~~~~~
1 diagnostic generated.
If it helps, the bit after the headers is preprocessed by clang to
void foo (const char *msg, ...)
{
va_list ap;
__builtin_stdarg_start((ap), (msg));
vfprintf ((&__sF[2]), msg, ap);
__builtin_va_end (ap);
}
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillaclang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"