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: Linux and Windows generate different binaries


On Sat, Jul 15, 2017 at 07:40:13PM +0100, Yuri Gribov wrote:
> Looked at generators, we have three comparison routines which return 0
> for different objects but all seem to be safe i.e. can't influence
> code generated by GCC.
> 
> alt_state_cmp (genautomata.c) - intentional, duplicates are removed afterwards.
> 
> optab_rcode_cmp (genopinit.c) - compares objects with rcode == UNKNOWN
> as equal but that's fine as later codes treats them in the same way
> (sets their code_to_optab_ table to unknown_optab).
> 
> subroutine_candidate_cmp (genrecog.c) - this compares function
> candidates with same number of statements in them as equal. This may
> cause different split of state recognition code to recog_%d
> subroutines but should not change semantics of code as a whole.

That sounds like a debugging nightmare though.

Would it hurt us to use stable sorts *everywhere*?


Segher


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