This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/13172] New: Error generated in case of local variable declaration with missing type specifier
- From: "eckart at icd dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Nov 2003 10:37:24 -0000
- Subject: [Bug c/13172] New: Error generated in case of local variable declaration with missing type specifier
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
In case of a local variable declaration without a type specifier, e.g.
void f()
{
c;
}
an error message is emitted:
"In function `f':
v.c:6: `c' undeclared (first use in this function)"
According to ANSI C, the variable should be treated as 'int' implicitly. This
works correctly for global variables and functions.
--
Summary: Error generated in case of local variable declaration
with missing type specifier
Product: gcc
Version: 3.2
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: eckart at icd dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: Linux ls12pc4 2.4.19-4GB #1 Fri Sep 13 13:14:56 UTC 2002
i686 un
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13172