This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/47175] no predefined macros __amd64, __amd64__, __x86_64 __x86_64__ in prepocessor
- From: "hjl.tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 5 Jan 2011 14:28:54 +0000
- Subject: [Bug fortran/47175] no predefined macros __amd64, __amd64__, __x86_64 __x86_64__ in prepocessor
- Auto-submitted: auto-generated
- References: <bug-47175-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47175
--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> 2011-01-05 14:28:51 UTC ---
(In reply to comment #2)
> (In reply to comment #1)
> > Checking __amd64, __amd64__, __x86_64 __x86_64__ for
> > pointer size is wrong since pointer size may be
> > 32bit on x86-64.
> No, it can't be. The macros are set in dependence of the target platform (m32
> or m64). That means, if m32 is given the macro __i686 is set instead of
> __amd64. On the other hand, if m64 is given the macro __amd64 is set. I don't
> want to know the really underlying platform. I (or Matlab) want to know the
> target platform. So it is right to check the __amd64 macro. You can try it with
> the gcc-4.4. Only with gfortran-4.4 the macro is missed.
See
http://www.kernel.org/pub/linux/devel/binutils/ilp32/abi.pdf
where pointer size is 32bit.