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

            Bug ID: 40147
           Summary: Clang does not use the unqualified version of return
                    type for C11 program.
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangb...@nondot.org
          Reporter: anders.granlun...@gmail.com
                CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org,
                    neeil...@live.com, richard-l...@metafoo.co.uk

Test case (prog.c):

  int main()
  {
    typedef const int t();
    typedef int t();
  }

Compilation command line:

  clang prog.c -Wall -Wextra -std=c11 -pedantic-errors 

Observed behaviour:

  The following error message was outputed:

    error: typedef redefinition with different types ('int ()' vs
           'const int ()') typedef int t();

Expected behaviour:

  No error message. Both typedefs should define t to be of type 'int ()' since
  function types never have qualified return types.

Standard references:

  6.7.6.3.5

Note:

  gcc does not give any errors for the program.

-- 
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