This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/13172] Error generated in case of local variable declaration with missing type specifier
- From: "jsm at polyomino dot org dot uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Nov 2003 12:23:32 -0000
- Subject: [Bug c/13172] Error generated in case of local variable declaration with missing type specifier
- References: <20031124103719.13172.eckart@icd.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From jsm at polyomino dot org dot uk 2003-11-24 12:23 -------
Subject: Re: New: Error generated in case of local variable
declaration with missing type specifier
On Mon, 24 Nov 2003, eckart at icd dot de wrote:
> According to ANSI C, the variable should be treated as 'int' implicitly. This
> works correctly for global variables and functions.
ISO C90 subclause 6.5, first syntax production (I don't have ANSI C89 to
hand to find the subsection number there) is quite clear. The declaration
specifiers can't be empty (although they might have just a type qualifier
or a storage class specifier). Function definitions have their own syntax
(6.7.1) in which the declaration specifiers are optional.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13172