Re: Handling 'initializer element not constant' error



richard@xxxxxxxxxxxxxxx (Richard Tobin) writes:

In article <87abj1u4q4.fsf@xxxxxxxxxxxxxxxx>,
Ben Pfaff <blp@xxxxxxxxxxxxxxx> wrote:

The C standard recognises the problems with errno and doesn't require
it to be an identifier.

It's definitely an identifier.

Obviously "errno" is an identifier. I should have said that it's a
macro that doesn't have to expand to an identifier.

However, it might not be the name of a variable with external linkage.

It might not expand to the name of a variable at all.

Right. That's one way that it might not be the name of a
variable with external linkage.
--
char a[]="\n .CJacehknorstu";int putchar(int);int main(void){unsigned long b[]
={0x67dffdff,0x9aa9aa6a,0xa77ffda9,0x7da6aa6a,0xa67f6aaa,0xaa9aa9f6,0x11f6},*p
=b,i=24;for(;p+=!*p;*p/=4)switch(0[p]&3)case 0:{return 0;for(p--;i--;i--)case+
2:{i++;if(i)break;else default:continue;if(0)case 1:putchar(a[i&15]);break;}}}
.



Relevant Pages

  • Re: declaring errno
    ... > I see in the standard that errno may be a macro, ... > definition since it doesn't reserve storage. ... Each identifier with file scope listed in any of the following ...
    (comp.lang.c)
  • Re: Changes to stdlib.h from ver. 6.0 to ver. 8.0
    ... typedef struct TSK_Obj { ... "errno" is a macro that expands to a function call. ... shouldn't have used the name "errno" in the first place. ... order to access an actual object, or a program defines an identifier ...
    (microsoft.public.vc.language)
  • Re: Pointer Ambiguity
    ... which causes the identifier s to expand to the number 5 if an ... that is an ordinary file that is expanded in the ordinary ... or the use of no identifier at all ... Reading email is like searching for food in the garbage, ...
    (comp.lang.c)
  • Re: Handling initializer element not constant error
    ... Obviously "errno" is an identifier. ... macro that doesn't have to expand to an identifier. ... It might not expand to the name of a variable at all. ...
    (comp.lang.c)
  • Re: Macro redefinition
    ... forget to #undef EXPAND_DEF before redefining it. ... An identifier currently defined as an object-like macro shall not ... two replacement lists are identical. ...
    (comp.lang.c)