Re: __FUNCTION__

Richard Henderson (rth@twiddle.net)
Wed, 9 Jan 2002 14:35:25 -0800


On Tue, Jan 08, 2002 at 11:23:13PM -0800, Greg KH wrote:
> On Tue, Jan 08, 2002 at 06:12:02PM -0800, Richard Henderson wrote:
> > __FUNCTION__ was never a string literal in g++ because you can't decide
> > what the name of a template is until you instantiate it.
>
> According to the info page it was:
> The compiler automagically replaces the identifiers with a
> string literal containing the appropriate name.

The info page lied. This was true for C, but not C++.

> So, if you are going to change this (well, sounds like it is already
> done),

No, not done yet. Just warning now -- the feature still works (in C).

> what is the timeline from taking a well documented feature and
> breaking it (based on the example in the info page)? First a warning,
> and then an error, right?

Correct. The first gcc version to warn is 3.0.3, released Dec 20, 2001,
The feature will be removed in 3.2, due Oct 15, 2002 if everything goes
according to schedule.

r~
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/