This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: [RFC] std::string(0);


On Fri, Jun 11, 2004 at 08:27:35PM +0200, Paolo Carlini wrote:
> Nathan Myers wrote:
> 
> >c) Report the error if the compiler was not invoked "-pedantic".
>
> Assuming that this actually implementable with a reasonable amount of
> work, seems *in general* an original and interesting proposal: perhaps
> I'm wrong but in the greatest majority of the cases -pedantic is
> supposed to spill *more* errors, not less!

It really means "never mind what makes sense, do what the standard says." 
In this case, the standard says to ignore the error, but it makes better
sense to catch it. 

The overloading trick would work, but you would need access to a 
macro defined if "-pedantic" (unless there was some hackishly 
exploitable semantic difference between pedantic and regular modes;
in the old days, it would be worth checking, but not any more).
Of course there is no such macro.

Nathan Myers
ncm-nospam@cantrip.org


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