This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/26921] long long bit fields are passed to variadic functions as longs



------- Comment #3 from bugzilla at hburch dot com  2006-03-29 14:59 -------
#include <stdio.h>

struct s {
        long long int a : 33;
};

struct s foo = {0};

int main(void) {
        printf ("%lld\n", foo.a);
        return 0;
}

produces the following output using "gcc -Wall -o a a.c" for same system as Mac
OS X Bundle (gcc 4.0.0):
gcc -Wall -o a a.c
a.c: In function 'main':
a.c:10: warning: format '%lld' expects type 'long long int', but argument 2 has
type 'long long int'

Attached here because almost assuredly related.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26921


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]