This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/13172] New: Error generated in case of local variable declaration with missing type specifier


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]