This is the mail archive of the
mailing list for the GCC project.
Re: C++ PATCH: PR 20599 (1/3)
"Doug Gregor" <email@example.com> writes:
| On 25 Sep 2006 13:30:34 +0200, Gabriel Dos Reis <
| firstname.lastname@example.org> wrote:
| > "Peter Dimov" <email@example.com> writes:
| > | > you can use that library code only if GCC gets to the point of
| > | > compiling it -- which can't happen when the compiler does not
| > | > understand the option. Concretely, the feature-test is illusory
| > | > unless you also change how
| > | > GCC handls unrecognized command-line options.
| > |
| > | But the library could support both modes, with or without the
| > | option.
| > I do not disagree with that. However, it could be practically used
| > in the extended mode only if you know in advance that the compiler
| > supports it (because you have to explicit ask for it), which means
| > you're actually in the position of supplying the guarding macro.
| Assuming both "you"s are the same person, yes.
I did not assume that, but, oh well.
| It's much more likely that
| the first "you" (who is making use of the guard macros) is a
| standard-tracking, library-writing C++ guru that wants to make sure his
| libraries make the best use of C+. The second "you" is a user of the first
| "you"'s library.
The proposed plan is:
# (a) add C++0x features only with a command-line option (off by
# default, for now) so that users have to explicitly request the
# (b) document that option in the manual as enabling experimental
# features and warning people that C++0x is subject to change, and that
# the GCC Gimplementation will track the actual standard, without regard
# for backwards compatibility with previous GCC releases,
Under such circumstances, the second "you" user has to explicitly ask
for the feature, which means he/she already has to know about it and its
implications. And given that they are experimental and volatile, I
don't buy the arguments that he/she would provide those command lines and
not care about what upcoming C++.
| If we don't have these feature-test macros, library developers can't use
| these features at all.
That certainly is an overstatement, and I'm sure you know that.