schrieb:
> On Dec 5, 1:29 pm, "Guillaume Dargaud"
> <use_the_form_on_my_contact_p...@www.gdargaud.ne t> wrote:
>> #define WHERE printf("We are in %s", __func__)
>> void Function(void) {
>> WHERE;
>>
>> }
>>
>> And this:
>>
>> void Function(void) {
>> #define WHERE printf("We are in %s", __func__)
>> WHERE;
>>
>> }
Yes. Both expands to:
void Function(void) {
printf("We are in %s", __func__);
}
> There's no __func__ in C99.
There is.
6.4.2.2 #1 says:
The identifier __func__ shall be implicitly declared by the translator
as if, immediately following the opening brace of each function
definition, the declaration
static const char __func__[] = "function-name";
appeared, where function-name is the name of the lexically- enclosing
function.
--
OMG,-10==10 in linux!