This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Switch case ordering


On 09/08/2010 07:15 AM, Paulo J. Matos wrote:
> Hello,
> 
> I have noticed that at least in GCC4.3 the switch cases are ordered
> somewhere in a pass, since they arrive at expand pass ordered in
> increasing order. 
> 
> Can anyone tell me if I can assume this always to happen and where this
> is happening? I couldn't find any reference to this in the internal
> docs.

Yes, you can assume this.

It happens in sort_case_labels, initially called by gimplify_switch_expr.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]