This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/67065] [DR 1886] Missing diagnostics for ill-formed program with main variable instead of function


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. :)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]