https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61271
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to David Binderman from comment #0)
> 3.
>
> ../../src/trunk/gcc/cp/cp-array-notation.c:1420:7: warning: logical not is
> only applied to the left hand side of this comparison
> [-Wlogical-not-parentheses]
>
> Source code is
>
> if (!TREE_CODE (type) == FUNCTION_TYPE)
> {
> error_at (loc, "array notation cannot be used with function type");
> return false;
> }
>
> Maybe
>
> if (TREE_CODE (type) == FUNCTION_TYPE)
> {
> error_at (loc, "array notation cannot be used with function type");
> return false;
> }
>
> was intended.
Indeed. Here's a testcase for that one, which gives an ICE:
void func() { }
int main()
{
func[1:2:3];
}