Re: Weird optimization for tuples?

2017-02-12 Thread Jonathan Wakely
I've answered on gcc-help instead. On 12 February 2017 at 00:55, David Guillen Fandos wrote: > Hello! > > I have the following function > std::tuple getRawIdx(uint16_t tidx) { > return std::make_tuple(localidx.entries[tidx].indx_ptr, >

Weird optimization for tuples?

2017-02-11 Thread David Guillen Fandos
Hello! I have the following function std::tuple getRawIdx(uint16_t tidx) { return std::make_tuple(localidx.entries[tidx].indx_ptr, localidx.entries[tidx].indx_size); } Where s is a struct like typedef struct __attribute__((packed)) { uint32_t indx_ptr;