This is the mail archive of the gcc@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]

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.


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