decl.c (grokvardecl): Use an accurate location in error message about main as a globa...
authorPaolo Carlini <paolo.carlini@oracle.com>
Fri, 10 May 2019 18:00:52 +0000 (18:00 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Fri, 10 May 2019 18:00:52 +0000 (18:00 +0000)
commit67254b50a63b1a1095762fefef801a6a53ccece5
tree540205394d161f37d0d26a2060b88df3b3c9d06e
parent7bdc7e0661dae954b919416882d5a9064a202614
decl.c (grokvardecl): Use an accurate location in error message about main as a global variable.

/cp
2019-05-10  Paolo Carlini  <paolo.carlini@oracle.com>

* decl.c (grokvardecl): Use an accurate location in error message
about main as a global variable.

/testsuite
2019-05-10  Paolo Carlini  <paolo.carlini@oracle.com>

* g++.dg/diagnostic/main1.C: New.

From-SVN: r271070
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/diagnostic/main1.C [new file with mode: 0644]