This is the mail archive of the 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: [PATCH] specs changes for libstdc++ debug mode

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

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)

This program will link with libfoo when FOO is #defined, or
libbar otherwise.

I also find the feature it unintuitive, but it is in wide-spread
use on Windows, and it is kind of nifty beacause it lets one
"implicitly" associate a set of headers with a specific library

Here's a link for reference:


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