http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48082
Summary: Problem compiling function that returns va_list on 64 bit system. Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassig...@gcc.gnu.org ReportedBy: x.user1...@gmail.com I am trying to compile the following simple code snippet: ''' /* test.c */ #include <stdio.h> #include <stdarg.h> va_list function(int i, va_list args){ return args; } int main(void){ return 0; } ''' I am running 64 bit Ubuntu. The code can be compiled successfully using. gcc -Wall test.c -o test -m32 However if I compile using the standard 64 bit mode gcc -Wall test.c -o test I get the following error: test.c:4: error: 'function' declared as function returning an array test.c: In function 'function': test.c:5: warning: return makes integer from pointer without a cast The above code does not serve much purpose other than to demonstrate where the compiler seems to be breaking. ----- gcc -v Using built-in specs. Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.3-4ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i486 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)