Results 1 to 4 of 4
I get a message about string literal concatanation using __FUNCTION__ is deprication. I can understand that the source program is using a command the will be desupported eventually but can ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 05-08-2003 #1Just Joined!
- Join Date
- May 2003
- Location
- UK-Heart of Cheshire
- Posts
- 31
__FUNCTION__
I get a message about string literal concatanation using __FUNCTION__ is deprication. I can understand that the source program is using a command the will be desupported eventually but can anyone explian this in detail. What should be used instead etc.
Examples please
- 05-08-2003 #2Just Joined!
- Join Date
- May 2003
- Location
- Beijing,China
- Posts
- 7
Faint~
- 05-08-2003 #3Just Joined!
- Join Date
- May 2003
- Location
- UK-Heart of Cheshire
- Posts
- 31
? Is that what should be used.
Originally Posted by cnean
What I forgot to ask was how is __Function__ used now?
If this is the new command how will it be used? An example would be very useful
- 05-08-2003 #4Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
I believe that what they're doing is moving __FUNCTION__ from cpp to the compiler proper, which probably makes it harder to concatenate it somehow. Use printf with %s instead, like this:
Old code:
New code:Code:printf(__FUNCTION__": error: foobar conglamerated\n");
Code:printf("%s: error: foobar conglamerated\n", __FUNCTION__);


Reply With Quote
