This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/67065] [DR 1886] Missing diagnostics for ill-formed program with main variable instead of function
- From: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 20 Aug 2015 02:03:35 +0000
- Subject: [Bug c++/67065] [DR 1886] Missing diagnostics for ill-formed program with main variable instead of function
- Auto-submitted: auto-generated
- References: <bug-67065-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67065
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org
Summary|Missing diagnostics for |[DR 1886] Missing
|ill-formed program with |diagnostics for ill-formed
|main variable instead of |program with main variable
|function |instead of function
--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Anders Granlund from comment #0)
> 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."
This sentence only exists in the most recent draft, so I'm not surprised it
isn't widely implemented yet. :)