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]

Re: How would *you* use an intern?


Marc Espie writes:
> As far as diagnostics go, I have a pet peeve of mine.
> Often, gcc gives warnings when comparing signed to unsigned values,
> in cases where the signed value *can't* possibly be negative.
> It would be great if gcc could take advantages of assertions, in a limited
> setting.

To be able to do this, GCC would need some form of range checking
architecture, where ranges of possible values are associated with
expressions and passed around by dataflow analysis.  It currently doesn't
have anything like this AFAIK.

If something like this were built, it could also be used to reduce the
overhead of the bounds checking code for fat pointers, as well as
possibly eliminate other bogus warnings and improve some code.



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