aboutsummaryrefslogtreecommitdiff
path: root/gcc/except.cc
diff options
context:
space:
mode:
authorNathaniel Shead <nathanieloshead@gmail.com>2024-05-11 22:25:44 +1000
committerNathaniel Shead <nathanieloshead@gmail.com>2024-05-22 10:30:41 +1000
commit292fc21a8d7aa2f16e61ac941e22ada6ddd85500 (patch)
treea93b53992981677d0bc2e4cd4152d15d3d75c91b /gcc/except.cc
parentbad96a02c486fb03e328a7455c9bc97cc85c02fe (diff)
downloadgcc-292fc21a8d7aa2f16e61ac941e22ada6ddd85500.zip
gcc-292fc21a8d7aa2f16e61ac941e22ada6ddd85500.tar.gz
gcc-292fc21a8d7aa2f16e61ac941e22ada6ddd85500.tar.bz2
c++: Strengthen checks on 'main'
This patch adds some missing requirements for legal main declarations, as according to [basic.start.main] p2. gcc/cp/ChangeLog: * decl.cc (grokfndecl): Check for main functions with language linkage or module attachment. (grokvardecl): Check for extern 'C' entities named main. gcc/testsuite/ChangeLog: * g++.dg/abi/main.C: Check pedwarn for main with linkage-spec. * g++.dg/modules/contracts-1_b.C: Don't declare main in named module. * g++.dg/modules/contracts-3_b.C: Likewise. * g++.dg/modules/contracts-4_d.C: Likewise. * g++.dg/modules/horcrux-1_a.C: Export declarations, so that... * g++.dg/modules/horcrux-1_b.C: Don't declare main in named module. * g++.dg/modules/main-1.C: New test. * g++.dg/parse/linkage5.C: New test. * g++.dg/parse/linkage6.C: New test. Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
Diffstat (limited to 'gcc/except.cc')
0 files changed, 0 insertions, 0 deletions