Movatterモバイル変換


[0]ホーム

URL:


Issue 1886 - WG21 CWG Issues
Title
Language linkage for main()
Status
cd4
Section
6.10.3.1 [basic.start.main]
Submitter
Richard Smith

Created on2014-03-04.00:00:00 last changed109 months ago

Messages

msg6040 (view)
Date: 2015-05-15.00:00:00

[Moved to DR at the May, 2015 meeting.]

msg5157 (view)
Date: 2014-11-15.00:00:00

Proposed resolution (November, 2014):

  1. Change 6.10.3.1 [basic.start.main] paragraph 2 as follows:

  2. An implementation shall not predefine themainfunction. This function shall not be overloaded.ItIts type shall have C++ language linkage and it shallhave a declared return type of typeint, butotherwise its type is implementation-defined. Animplementation shall allow both...
  3. Change 6.10.3.1 [basic.start.main] paragraph 3 as follows:

  4. The functionmain shall not be used within aprogram. The linkage (6.7 [basic.link])ofmain is implementation-defined. A program thatdefinesmain as deleted or thatdeclaresmain to beinline,static, orconstexpr is ill-formed.Themain functionshall not be declared with alinkage-specification(9.12 [dcl.link]). A program that declares a variablemain at global scope or that declares the namemain with C language linkage (in any namespace) isill-formed. The namemain is not otherwisereserved...
msg5006 (view)
Date: 2014-03-04.00:00:00

There does not appear to be any restriction on givingmain() an explicit language linkage, but it shouldprobably be either ill-formed or conditionally-supported.

History
DateUserActionArgs
2017-02-06 00:00:00adminsetstatus: drwp -> cd4
2015-11-10 00:00:00adminsetstatus: dr -> drwp
2015-05-25 00:00:00adminsetmessages: +msg6040
2015-05-25 00:00:00adminsetstatus: tentatively ready -> dr
2014-11-24 00:00:00adminsetmessages: +msg5157
2014-11-24 00:00:00adminsetstatus: drafting -> tentatively ready
2014-07-07 00:00:00adminsetstatus: open -> drafting
2014-03-04 00:00:00admincreate

[8]ページ先頭

©2009-2026 Movatter.jp