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]
Other format: [Raw text]

Re: Wconversion versus Wcoercion


"Manuel López-Ibáñez" <lopezibanez@gmail.com> writes:

| My project is about "risky" coercions in general: assignments,
| operators, prototypes. You can see some (and comment and propose)
| testcases in http://gcc.gnu.org/wiki/Wcoercion .

    void h2(void)
    {
        int i;
        for(i=0; i < sizeof(double); i++);
    }

when the ranges are known to imply no harm, it is irritating to get
the warning.  It is conventional to use int a loop index.

Also don't include the warning option in the diagnostic message.
There is a separate machinery that shows which option control which
diagnostic.  

-- Gaby


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