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)
I assume they represent full diversity of "standards". Ansi, C99, GNU C?
There is only one actual C standard: ISO 9899. But from time to time, that standard is updated. The difference you observed was introduced in one such update, from ISO 9899:1990 (aka C90) to 9899:1999 (aka C99).
Implicit int was originally allowed by C's inventors, K&R, and kept by C90, but (to my surprise, now that I've actually looked it up), disallowed by C99.
Last I used it, Keil C51 only claimed support for C90, not C99. So there's nothing wrong with it allowing you to write code relying on implicit int.
I think that these are just propositions not rules and there doesn't exist fully standard compiler.
You think incorrectly on both counts. ISO C is very much a rule, and there do exist compilers that implement it completely.
Thank you, I was a little confused and than Andy Neil paste a link to Keil supported standards http://www.keil.com/product/isoansi.asp
Keil supports some of C99 rules and that explains everything.