Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/init/goto3.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
children |
line wrap: on
line source
// PR c++/63558 // { dg-options "-fpermissive -w" } extern int abs(int); static long int n_ants; enum enum_var_types { VAR_NONE, VAR_DELTA, VAR_SWITCH }; static enum enum_var_types option_var_n_ants; void adapt_parameters_next_iteration(void) { switch(option_var_n_ants) { case VAR_NONE: break; case VAR_DELTA: int trunc_n_ants = 0; // { dg-message "initialization" } n_ants += trunc_n_ants; break; case VAR_SWITCH: // { dg-error "jump" } break; default: break; // { dg-error "jump" } } }