[Issue 20377] extern(C) void main(string[] args) has invalid 'args'
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Sun Nov 10 05:15:58 UTC 2019
    
    
  
https://issues.dlang.org/show_bug.cgi?id=20377
elronnd at elronnd.net changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |elronnd at elronnd.net
--- Comment #1 from elronnd at elronnd.net ---
I don't think straight up erroring is a good idea.  extern(C) void
main(string[]) is perfectly *valid*; I don't think the language says anything
special about the type of extern(C) main.
However I do agree that, with the current behaviour, errors such as yours are
likely to occur.  Proposal: make it a warning with a 'did you mean (int argc,
char **argv)?' which also notes that if you really do want that behaviour you
can silence the warning with pragma(mangle, "main") void cmain(string[])
--
    
    
More information about the Digitalmars-d-bugs
mailing list