This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

global variable declaration without giving type identifier generates no warning

I thing it should generate a warning.
but it doesn't.
C51 COMPILER V8.16
Compiler settings: level=2

#include<something.h>

my_strange_global_variable = 1;

void main(void)
{ ...;
}

C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)

Parents
  • Well, every compiler I know
    acts differently on that code
    so I assume they represent
    full diversity of "standards".
    Ansi, C99, GNU C?
    Give me some links that proves
    there is one dominating "standard".
    I think that these are just propositions
    not rules and there doesn't exist fully standard compiler.

Reply
  • Well, every compiler I know
    acts differently on that code
    so I assume they represent
    full diversity of "standards".
    Ansi, C99, GNU C?
    Give me some links that proves
    there is one dominating "standard".
    I think that these are just propositions
    not rules and there doesn't exist fully standard compiler.

Children