[llvm-bugs] [Bug 40039] New: Confusing error message when function pointer return type is not defined
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Dec 15 16:07:36 PST 2018
https://bugs.llvm.org/show_bug.cgi?id=40039
Bug ID: 40039
Summary: Confusing error message when function pointer return
type is not defined
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: yshuiv7 at gmail.com
CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
richard-llvm at metafoo.co.uk
Code:
int (*func)(int *); // <- this is a normal function
// this is a function that returns a function type,
// which is totally fine
int (*(*funcx)(int *))(int *);
//typedef struct asd asdf; // <- code compiles with this line, as expected
// what is clang complaining about?
asdf (*func2)(int *);
For the last line, clang complains about:
error: function cannot return function type 'int (int *)'
Which makes no sense to me.
Compiler explorer link: https://godbolt.org/z/dUf9t4
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20181216/b7262c37/attachment.html>
More information about the llvm-bugs
mailing list