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]

Re: C++98/C++11 ABI compatibility for gcc-4.7


On Thu, Jun 14, 2012 at 10:33:11PM +0200, PaweÅ Sikora wrote:
> from the others side, someone can use -frecord-gcc-switches to detect mixed '-std=...'
> after final linking and report error in such cases.

I don't think -frecord-gcc-switches is useful for that, unless you always
specify explicit -std= option, because with -frecord-gcc-switches without
the default -std=gnu98 you get nothing in the note section, and as strings
are merged with this option, all you can find out is whether there was at
least one -std=c++11 or -std=gnu++0x etc. compiled object.
If you use -grecord-gcc-switches, you can investigate the command line
per translation unit (and find out which was it), of course for
this kind of detection you need to limit yourself to
DW_AT_language 4 and then look at DW_AT_producer...

	Jakub


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