This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How would *you* use an intern?
- To: espie at quatramaran dot ens dot fr (Marc Espie)
- Subject: Re: How would *you* use an intern?
- From: Joe Buck <jbuck at synopsys dot COM>
- Date: Mon, 4 Jun 2001 12:47:25 -0700 (PDT)
- Cc: shebs at apple dot com, gcc at gcc dot gnu dot org
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.