This is the mail archive of the
mailing list for the GCC project.
Re: A patch to constify gcc.c (Really, summarizing remaining warnings)
- To: law at cygnus dot com
- Subject: Re: A patch to constify gcc.c (Really, summarizing remaining warnings)
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Thu, 18 Mar 1999 15:41:29 -0500 (EST)
- Cc: egcs-patches at cygnus dot com
> From: Jeffrey A Law <email@example.com>
> > 3. 35-55 unused parameter `???'
> > These are fixable by either using ATTRIBUTE_UNUSED (easy), or
> > by actually removing the parameter from the function definition and
> > all calling sites (harder). We need to decide which way it'll be
> > handled. In the cases where the parameter is used under #ifdef
> > conditionals, you've already stated we should use ATTRIBUTE_UNUSED.
> Well, when there's an interface that isn't easily changed, then
> ATTRIBUTE_UNUSED is the way to go. For example, a function called by
> I've got no problem changing interfaces where doing so isn't a major pain
> in the butt. In fact, I'd prefer to kill the unused parameters :-)
Okay, I'll start on these especially the ones where using
ATTRIBUTE_UNUSED is appropriate since they are one-liners, and I'll do
the harder ones after that.
> > 4. 30-40 comparison between signed and unsigned
> > Most of these are fixable using casts. However some might be
> > due to bugs. In particular, the definition of Pmode in sparc.h
> > produces these warnings when compared against its own supposed type.
> > I.e. here is a testcase, you may want to put it in the testsuite:
> Let's put these on hold for #1, #2 & #3.
Okay. Please remember to insert my testcase.
> > 7a. 9 variable `???' might be clobbered by `longjmp' or `vfork'
> > 7b. 5 argument `???' might be clobbered by `longjmp' or `vfork'
> > (A bit more of these also occur in the cp/ and java/ dirs.)
> > I don't know how we could fix these. Perhaps one could make the
> > parameter or variable volatile, but it doesn't really fix the problem
> > and it seems to just provoke the warning on another variable. (?)
> You've fixed most of these, right?
Short answer: yes, I've fixed most.
Long answer: I've fixed those that appear on my systems. Its
possible due to some convoluted ifdef conditionals that they still
happen on other platforms. E.g. anywhere setjmp is called outside of
do_float_handler might elicit the warning. I didn't want to do a
complete purge of setjmp calls since if the code is ifdef'ed out on my
system, I won't know if I typo'ed something.
I've also not yet done the ones from the java directory. Per already
has 5 patches from me in his queue, I don't want to overload him. :-)
Kaveh R. Ghazi Engagement Manager / Project Services
firstname.lastname@example.org Qwest Internet Solutions