On reflection, I'm not so sure about these anymore:

On Mon, Nov 04, 2024 at 06:26:47PM -0500, Marek Polacek wrote:
> +  switch (extern int i = 0);  /* { dg-error "in condition|both .extern. and 
> initializer" } */

I think this is definitely valid.

> +  switch (register int i = 0); /* { dg-error "in condition" } */
> +  switch (static int i = 0); /* { dg-error "in condition" } */
> +  switch (thread_local int i = 0); /* { dg-error "in 
> condition|function-scope" } */

All three may be valid, actually.

> +  switch (typedef int i); /* { dg-error "in condition|initializer" } */
> +  switch (typedef int i = 0); /* { dg-error "in condition|initialized" } */

Both remain invalid.

Joseph, let me know if you agree, and I'll adjust the patch.  Thanks.

Marek

Reply via email to