This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Unnecessary warning
- To: Martin dot Niklasson at nokia dot com
- Subject: Re: Unnecessary warning
- From: Kip Macy <kip at lyris dot com>
- Date: Mon, 3 Jan 2000 10:01:24 -0800 (PST)
- cc: gcc-bugs at gcc dot gnu dot org
It depends on how you define the desired behaviour of a warning. My
desired behaviour is to inform me of things in the code that need to be
fixed, and once fixed the message will go away. However, this example is
not something one can change without breaking the code - thus, by my
definition, it is a bug.
-Kip
On Mon, 3 Jan 2000 Martin.Niklasson@nokia.com wrote:
> Dear Sirs
>
> I am not sure whether you consider this a bug or a
> feature, but it annoys me a little. If you enter the
> following C++ lines in a program:
>
> unsigned int foo;
> foo = 4294967295; //Or any constant larger than 2^31
> cout << foo << endl;
>
> then g++ warns about the constant being
> "so large that it is unsigned".
>
> I am using the following system:
>
> PIII 500
> Redhat 6.0
> Gcc 2.95.2
>
> Regards
> Martin Niklasson
> martin.niklasson@nokia.com
>
>