This is the mail archive of the libstdc++@gcc.gnu.org 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


On Monday, July 14, 2003, at 05:02 PM, Doug Gregor wrote:

Here's the patch that enables linking against libstdc++-debug (the libstdc++ debug mode library).

Tested on i686-pc-linux-gnu and powerpc-apple-darwin; no regressions. ChangeLog follows.

Okay to commit?

Doug

2003-07-14 Doug Gregor <dgregor@apple.com>

	* g++spec.c (lang_specific_driver): Link against -lstdc++-debug
	when we've seen -D_GLIBCXX_DEBUG.

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.

Instead of overloading -D... as a compiler flag, perhaps it would be
clearer to define a new -f flag explicitly.

(Again, I withdraw my objection if there are already macros where -D...
changes the compiler behavior.  My only concern is that users might find
this surprising.  If that's the way things work already, then my concern
is irrelevant.)

--Matt


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