C++ Logo

SG10

Advanced search

Subject: Re: [SG10] Minutes from 06-03 teleconference
From: Nelson, Clark (clark.nelson_at_[hidden])
Date: 2013-06-05 10:36:50


>> We considered a distinction like that of clang's __has_feature vs. __has_extension, but consensus was there is not adequate justification.

> I don't think this addresses my question on this front, which was: which of those two behaviors do the feature-test macros provide? Was that question resolved by the discussion?

On the surface, this is strictly a quality-of-implementation question, because the difference depends solely on whether the implementation is going to produce a warning for a use of a non-standard feature -- especially an anachronistic feature from a future standard, those being the only ones that also concern SG10.

In that sense, it's not a question for SG10 to decide; it's between clang's users and implementers to decide what behavior is most useful.

My recommendation, for what it's worth, is that there should be an invocation option that specifies whether a user wants checking for conformance to a formal release of the standard, as opposed to just wanting his code to be compiled. If the user has specified that checking is important to him, it would make sense to warn about extensions, and it would also make sense to disable definitions of the macros specified by SG10 for future-standard features.

In other words, which meaning the SG10 macros have should be selected by a command-line option.

Clark


SG10 list run by sg10-owner@lists.isocpp.org