https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67065
Bug ID: 67065 Summary: Missing diagnostics for ill-formed program with main variable instead of function Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: anders.granlund.0 at gmail dot com Target Milestone: --- The following program is ill-formed (proc.cc): int main; Compile it with the following command line: clang++ prog.cc -std=c++14 -pedantic-errors No error messages are given. Since the program is ill-formed I expected to get at least one error message. The program is ill-formed by following sentence in [basic.start.main]p3 (http://eel.is/c++draft/basic.start.main#3): "A program that declares a variable main at global scope or that declares the name main with C language linkage (in any namespace) is ill-formed." I have tired this with gcc HEAD 6.0.0 20150729 here: http://melpon.org/wandbox/permlink/uxZxjSFQqBPYXB8b