[Bug c/48080] New: Problem compiling function that returns va_list on 64 bit system.
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Apr 1 19:03:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48080
Summary: Problem compiling function that returns va_list on 64
bit system.
Product: gcc
Version: 4.4.3
Status: RESOLVED
Severity: minor
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: x.user1372@gmail.com
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
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)
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-04-01 19:02:43 UTC ---
.
*** This bug has been marked as a duplicate of bug 48082 ***
More information about the Gcc-bugs
mailing list