This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: "discards qualifiers" is less helpful than "discards const"
- To: "L. Peter Deutsch" <ghost at aladdin dot com>
- Subject: Re: "discards qualifiers" is less helpful than "discards const"
- From: Zack Weinberg <zack at bitmover dot com>
- Date: Wed, 01 Sep 1999 14:45:22 -0700
- cc: gcc-bugs at gcc dot gnu dot org
"L. Peter Deutsch" wrote:
> > This is somewhat unfair to both sides. On the one hand, putting the error
> > message you want back is non-trivial because of the way the code has been
> > restructured since 2.7. It is not simply a case of reverting a patch.
>
> Thanks for the information. I had no way of knowing this. I'm quite
> willing to accept an answer of "The code has been redesigned, so
> retrofitting isn't feasible, and the current error handling framework makes
> handling this properly very awkward." If that information had been in the
> original response, I would simply have shrugged my shoulders and been
> willing to wait for someone with more knowledge of the compiler to propose a
> fix the maintainers would accept.
It might be worth noting that there are only three qualifiers, at
least in C: const, volatile, and restrict. Odds are your programs
never use volatile or restrict, so when you see "discarding
qualifiers" you can pretty much assume it means "discarding const."
I believe I can get rid of the kludge in the patch I posted, but it
will take me a couple days.
zw