S
somenath
Hi ALL ,
I need to print the name of the function as my debug message. I have
tried the following way
#include<stdio.h>
#include<stdlib.h>
#define __STR(x) _VAL(x)
#define _VAL(x) #x
int main (void)
{
puts( __FUNCTION__ __STR( __FILE__));
return 0;
}
But while compiling the program I am getting the following warning .
simple.c: In function `main':
simple.c:8: warning: concatenation of string literals with
__FUNCTION__ is deprecated
Is there any correct way I can print the function name with file
name ?
Regards,
Somenath
I need to print the name of the function as my debug message. I have
tried the following way
#include<stdio.h>
#include<stdlib.h>
#define __STR(x) _VAL(x)
#define _VAL(x) #x
int main (void)
{
puts( __FUNCTION__ __STR( __FILE__));
return 0;
}
But while compiling the program I am getting the following warning .
simple.c: In function `main':
simple.c:8: warning: concatenation of string literals with
__FUNCTION__ is deprecated
Is there any correct way I can print the function name with file
name ?
Regards,
Somenath