https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107178
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2022-10-07
Status|UNCONFIRMED |NEW
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> GCC diagonstic seems reasonable.
Only from the most mechanical perspective.
> because GCC assumes you started to define a bitfield which is reasonable
> assumention really.
Not really, because the chances of somebody typing ':' instead of ';' is quite
high (they're on the same key on many keyboard layouts) and the chances of
somebody trying to define a bit-field with a function type is practically zero.
Although the parser just sees "bit-field with function type" we can apply some
intelligence and say that's probably not what the user was trying to do. A
simple typo is more likely.
> At least GCC points out the colon and even suggest you started a bitfield
> which is what a colon normally does here ....
But not with a function type.