This is the mail archive of the gcc-patches@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: Bug in highest_pow2_factor


    Well, so far, we don't even have a regression, so I'm not sure we have
    to do anything for 3.1.  I'm trying to understand this better.

Well, we have *potential* regressions in that things that were done
in a different way are now done using that function, so it if doesn't
work properly those things that used to work won't.

    So, check for overflow later.  Or, define the function to never return
    a value bigger than BIGGEST_ALIGNMENT, and then do that in the case
    you have by masking out bits if c0 that are bigger than that.

I thought of limiting it to BIGGEST_ALIGNMENT (or actually
HIGH_OFILE_ALIGNMENT, or whatever it's called), but I'm not sure
there's a point in that.

    Is the "highest power of two" ever negative?

No.  And my patch contains comments to make that clear.


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