Find the answer to your Linux question:
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.
  1. #1
    Just 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

  2. #2
    Just Joined!
    Join Date
    May 2003
    Location
    Beijing,China
    Posts
    7
    Faint~

  3. #3
    Just Joined!
    Join Date
    May 2003
    Location
    UK-Heart of Cheshire
    Posts
    31
    Quote Originally Posted by cnean
    Faint~
    ? Is that what should be used.

    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

  4. $spacer_open
    $spacer_close
  5. #4
    Linux 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:
    Code:
    printf(__FUNCTION__": error: foobar conglamerated\n");
    New code:
    Code:
    printf("%s: error: foobar conglamerated\n", __FUNCTION__);

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •