On Sat, 16 May 2015 14:58:14 +0200, Jan Kratochvil wrote: > On Fri, 15 May 2015 19:04:03 +0200, Pedro Alves wrote: > > On 05/13/2015 09:17 PM, Jan Kratochvil wrote: > > > + if (TYPE_CODE (gdb_type) != TYPE_CODE_PTR) > > > + error (_("Invalid type code %d of symbol \"%s\" " > > > + "in compiled module \"%s\"."), > > > + TYPE_CODE (gdb_type_from_ptr), COMPILE_I_EXPR_VAL, > > > + objfile_name (objfile)); > > > + > > > + switch (TYPE_CODE (gdb_type_from_ptr)) > > > + { > > > + case TYPE_CODE_ARRAY: > > > + retval = gdb_type_from_ptr; > > > + gdb_type_from_ptr = TYPE_TARGET_TYPE (gdb_type_from_ptr); > > > + break; > > > + case TYPE_CODE_FUNC: > > > + retval = gdb_type_from_ptr; > > > > AFAIC, retval is always gdb_type_from_ptr, and could be > > moved out of the switch. > > It was written this way as it has semantical logic - how the type is > determined depends on TYPE_CODE_* of that object. Just accidentally in this > case it is the same. I do not do performance micro-optimizations which > compiler will do anyway. But I have changed it. I see I made a thinko in that optimization, therefore checked-in this fix-up: 4d18dfad9edf822df205edc2c1fe3fe9f1e467b8 Jan