|
From: | Kevin Gallagher |
Subject: | Re: warnings compiling Emacs 22 on amd64 |
Date: | Mon, 15 Jan 2007 23:58:08 -0600 |
User-agent: | Thunderbird 1.5.0.9 (Windows/20061207) |
Richard Stallman wrote:
Some compilers support the use of #pragma directives to disable certain warnings it would otherwise generate for the lines wrapped within those specific #pragma directives. PerhapsI think we should demand some way to turn off the warning in specific places. Does GCC have a feature to turn off warnings in a specific piece of code? I don't remember. It would be a good feature to have. However, a specific feature just for this kind of warning would also be useful. I have an idea for what it could look like: an extra cast. if ((int)(short)foo > (int)SHRT_MAX || (int)(short)foo < (int)SHRT_MIN) (short) would be a way of saying "yes I know this is a short", and this could suppress the warning. What do you think of that feature?
GCC could be extended to support this.I think this, or some other in line compiler directive, is a better way to instruct the compiler
how to behave, rather than a modification of the source code itself.
[Prev in Thread] | Current Thread | [Next in Thread] |