https://llvm.org/bugs/show_bug.cgi?id=25110

            Bug ID: 25110
           Summary: "Implicit int" is still available for function
                    parameters in C99
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangb...@nondot.org
          Reporter: mimomo...@gmail.com
                CC: llvm-bugs@lists.llvm.org
    Classification: Unclassified

A legacy "implicit int" feature of was removed in C99.
But Clang still allows it for function parameters (e.g. `void f(x) {}`)
and produces no warnings unless `-pedantic` is specified.

Clang should produce warnings (at least).

For reference, here is a list of "implicit int" warnings/errors in C99 mode: 

  void f(x) {};
    [no warning!]

  void g(x);
    [error]
    a parameter list without types is only allowed in a function definition

  x;
    [warning]
    type specifier missing, defaults to 'int' [-Wimplicit-int]

(gcc produces warnings for all the three cases.)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to