Category: GCC

Printing the gcc predefined macros to stdout

Any time you wanted to know the list of gcc used macros and their values. Here is the command details

touch foo.h; gcc -dM -E foo.h

will list all the macros used.

The option

-dM will generate the list of all #defines used by the pre-processor during execution, this also includes pre-defined macros.

-E will stop the compiler after pre-processing stage. Will not enter to the compiling stage. The output will be in the preprocessed form and will be sent to the stdout.

GCC 4.3.0 exposes a kernel bug [LWN.net], By Jake Edge

A change to GCC for a recent release coupled with a kernel bug has created a messy situation, with possible security implications. GCC changed some assumptions about x86 processor flags, in accordance with the ABI standard, that can lead to memory corruption for programs built with GCC 4.3.0. No one has come up with a way to exploit the flaw, at least yet, but it clearly is a problem that needs to be addressed.

GCC 4.3.0 exposes a kernel bug [LWN.net]

Blogged with the Flock Browser