This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/37550] New: Please document predefined sub-architecture support macros
- From: "martinrb at google dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Sep 2008 02:35:05 -0000
- Subject: [Bug preprocessor/37550] New: Please document predefined sub-architecture support macros
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The preprocessor symbol __MMX__ indicates whether this gcc
includes mmx support. This is extremely useful, but undocumented.
I only found out by finding the symbol in other peoples' code.
The particular symbol __MMX__ should be documented in
the obvious place, namely where the -mmmx flag is documented
in the x86-specific page.
And of course, similarly for other such predefined flags.
I assume there's one for sse, but I haven't actually tried to find out.
Here's a shell transcript, again compiling my favorite
source file, /dev/null:
(martinrb@spraggett) ~ $ gcc -mmmx -E -dD -x c /dev/null | sort > /tmp/t1
(martinrb@spraggett) ~ $ gcc -mno-mmx -E -dD -x c /dev/null | sort > /tmp/t2
(martinrb@spraggett) ~ $ diff /tmp/t[12]
92d91
< #define __MMX__ 1
--
Summary: Please document predefined sub-architecture support
macros
Product: gcc
Version: 4.2.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: preprocessor
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: martinrb at google dot com
GCC host triplet: x86_64-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37550