Questions tagged [implicit-int]

Implicit int is a deprecated C compiler feature, where a variable or function lacking a type specifier would have the type int.

Implicit int is a deprecated C compiler feature, where a variable or function lacking a type specifier would have the type int. It was deprecated in the C99 standard, due to concerns over silent errors.

2 questions
14
votes
1 answer

Which section in C89 standard allows the "implicit int" rule?

While using gcc, the code: register a = 3; static b = 3; it is allowed while using the -std=c89 -pedantic-errors flags, although there is a warning. However it receive an error with the -std=c99 -pedantic-errors flags. I wonder which section of…
Victor
  • 1,303
  • 1
  • 10
  • 28
5
votes
3 answers

C Compiler not throwing error when no type is specified

Why this below program not throwing an error: dfljshfksdhfl; #include int main () { return 0; } gcc would just throw a warning: test.c:1:1: warning: data definition has no type or storage class [enabled by default]
Sandeep Nagaraj
  • 2,122
  • 2
  • 12
  • 10