C++ Logo

sg10

Advanced search

Re: [SG10] How closely should our recommendation match clang?

From: Nelson, Clark <clark.nelson_at_[hidden]>
Date: Fri, 25 Jan 2013 17:23:24 +0000
> > But the point of the conditional compilation is presumably that there
> is a way for the program to do its job without the new feature. A
> program that is simply written to require the new feature doesn't need
> conditional compilation at all; it can just try to use the new feature,
> and fail to compile if it isn't available.
>
> But it will not do the right thing when the feature is present. This
> can cause bad outcomes because of ODR violations if combined with code
> from another compiler.

Mixing code from different from different compilers is something that is certainly beyond the scope of the standard, but let's talk about it anyway, at least for a bit. Can you present an example of code that would produce the kind of bad outcome that concerns you?

Clark

Received on 2013-01-25 18:23:28