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

[Bug preprocessor/37550] New: Please document predefined sub-architecture support macros


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


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