This is the mail archive of the
mailing list for the libstdc++ project.
Re: [PATCH] specs changes for libstdc++ debug mode
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Martin Sebor <sebor at roguewave dot com>
- Cc: Matt Austern <austern at apple dot com>, Doug Gregor <dgregor at apple dot com>, gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Date: 16 Jul 2003 18:53:36 +0200
- Subject: Re: [PATCH] specs changes for libstdc++ debug mode
- Organization: Integrable Solutions
- References: <A4E13D38-B701-11D7-B8E7-000393B2ABA2@apple.com><3F157A05.firstname.lastname@example.org>
Martin Sebor <email@example.com> writes:
| Matt Austern wrote:
| > On Monday, July 14, 2003, at 05:02 PM, Doug Gregor wrote:
| > Stupid question: is there any other place in the compiler where we change
| > the behavior of the driver based on whether the user defines a special
| > macro?
| > If so, if we're just carrying on with something we've done already,
| > then
| > I don't have a problem with this. If not, then I'm a bit uncomfortable
| > with it. -D is documented to define a macro. Having it do other things
| > as well, for special macros, strikes me as non-obvious.
| FWIW, the MSVC #pragma comment feature allows program source
| to embed commands for the linker in the object file, so there
| is existing practice for this non-obvious feature. E.g.,
| #ifdef FOO
| # pragma comment (lib,libfoo)
| # pragma comment (lib,libbar)
I'm not really found of the idea of having pragmas (or any CPP hack)
silently change portions of program semantics. I believe in compiler
switch controlling whole translation units (or better the whole
program) for that purpose.