This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: pointer <-> integer round-up
- From: dewar at gnat dot com (Robert Dewar)
- To: apl at alum dot mit dot edu, dewar at gnat dot com
- Cc: fjh at cs dot mu dot OZ dot AU, gcc at gcc dot gnu dot org, lord at emf dot net
- Date: Thu, 21 Mar 2002 14:01:40 -0500 (EST)
- Subject: Re: pointer <-> integer round-up
<< How about the fact that *many* organizations have development processes
that require that
the product builds must compile without any warnings or errors?
>>
Of course! In particular GNAT requires that all code compile warning free
(both the C and Ada parts). But that's not a reason for having *portable*
ways of removing warnings for non-portable code!
You seem to be saying that you need a way to get around such annoying rules
from these "may organizations". The point of such rules is not to suppress
warnings, it is to write warning free code.
If you suppress a warning in a manner that is legitimate for a particular
target, after examining the situation to ensure that the warning is not
warning about something important, that's fine.
But if you then port the code, you don't want a situation where you have
some construct that won't work on the new target, but the warning has been
suppressed. If possible this is the situation where you actively *want* a
warning.
Again, the purpose of such organizational rules is not to write warning
free code, it is to write code that is free of situations giving rise to
warnings. Warnings should only be *suppressed* in such environments with
extreme care and careful examination.