Re: many packages __FUNCTION__ problems
- From: Ali Akcaagac <ali akcaagac stud fh-wilhelmshaven de>
- To: desktop-devel-list gnome org
- Subject: Re: many packages __FUNCTION__ problems
- Date: 29 Jan 2002 06:43:43 +0100
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.
--
Name....: Ali Akcaagac
Status..: Student Of Computer & Economic Science
E-Mail..: mailto:ali akcaagac stud fh-wilhelmshaven de
WWW.....: http://www.fh-wilhelmshaven.de/~akcaagaa
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]