On Tue, 25 Sep 2012 02:04:26 -0700, Bart Vandewoestyne wrote:
> It's nice to know that the ambiguity error pops up in pedantic mode. I
> have emailed Scott Meyers about this, and now both him and me are
> actually puzzled why it *only* pops up in pedantic mode... Shouldn't
> that ambiguity error pop up without the -pedantic option too?
Without -pedantic, gcc extensions are still enabled so long as they do not
affect the interpretation of valid code.
The -std= option should ensure that all valid code is interpreted as
specified by the standard. The -pedantic option is required if you
also want invalid code to be handled as specified by the standard (i.e.
generating any required diagnostics).