Re: many packages __FUNCTION__ problems
- From: Owen Taylor <otaylor redhat com>
- To: Ali Akcaagac <ali akcaagac stud fh-wilhelmshaven de>
- Cc: desktop-devel-list gnome org
- Subject: Re: many packages __FUNCTION__ problems
- Date: Wed, 30 Jan 2002 09:36:58 -0500 (EST)
Ali Akcaagac <ali akcaagac stud fh-wilhelmshaven de> writes:
> On Mon, 2002-01-28 at 23:43, Owen Taylor wrote:
> > If code deals with __FUNCTION__ directly, it should just be patched in the mode:
> >
> > sprintf (__FUNCTION__ ": An error occurred);
> >
> > Goes to:
> >
> > sprintf ("%s: An error occurred, __FUNCTION__);
> >
> > No configure checks necessary.
>
> ahh (a lamp goes on:), i think i was to fast with my last mail.. yes the
> way you describe works perfectly. instead of concatenating __FUNCTION__
> use %s (2nd example).
>
> the reason why i made a workaround of this problem is, is because i am
> not 100% sure if __FUNCTION__ will get removed in the future completely.
> since getting a warning about things beeing depracted and removed in the
> future (also as written in the gcc info) would show me this. so instead
> using a formated string output, i checked wether the compiler supports
> these things. now we can argue which of both solutions is better but i
> still vote for the way in checking if the compiler understands it or
> not.
I don't believe there is any intention of removing __FUNCTION__ in the
future; the reason why the use of this in concatenating locations is
being deprecated is apparently that it causes some problems for the
structure of GCC's parsing stages.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]