https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83797

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2018-01-11 00:00:00         |2019-4-2

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
For the first example current trunk prints:

m.cc:1:1: error: cannot declare '::main' to be inline
    1 | inline static constexpr short main() {
      | ^~~~~~
m.cc:1:15: error: cannot declare '::main' to be 'constexpr'
    1 | inline static constexpr short main() {
      |               ^~~~~~~~~
m.cc:1:31: error: cannot declare '::main' to be static
    1 | inline static constexpr short main() {
      |                               ^~~~
cc1plus: error: '::main' must return 'int'


The last error is missing a proper location.


For the second example there's no substantive change. It should say "::main"
not "main", and should say "no return type" not "no type", and the caret
location should highlight "main" not the closing paren.

I'll try to work on this for GCC 10 if nobody beats me to it.

Reply via email to