This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Fixme in driver-i386.c
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: GCC <gcc at gcc dot gnu dot org>
- Date: Fri, 22 Dec 2006 12:23:12 +0100
- Subject: Fixme in driver-i386.c
Hello!
There is a fixme in config/i386/driver-i386.c:
--cut here--
if (arch)
{
/* FIXME: i386 is wrong for 64bit compiler. How can we tell if
we are generating 64bit or 32bit code? */
cpu = "i386";
}
else
--cut here--
Couldn't simple "sizeof(long)" do the trick here, i.e.:
--cut here--
int main()
{
int i = sizeof (long);
switch (i)
{
default:
abort();
case 4:
case 8:
printf ("%i\n", i);
}
return 0;
}
--cut here--
gcc -m32
./a.out
4
gcc -m64
./a.out
8
Uros.