[Bug c++/13932] [3.3/3.4/3.5 regression] duplicate warning message for conversion

gdr at integrable-solutions dot net gcc-bugzilla@gcc.gnu.org
Fri Jan 30 16:03:00 GMT 2004


------- Additional Comments From gdr at integrable-solutions dot net  2004-01-30 16:03 -------
Subject: Re:  New: [3.3/3.4/3.5 regression] duplicate warning message for conversion

"bangerth at dealii dot org" <gcc-bugzilla@gcc.gnu.org> writes:

| This little gem 
| ----------------- 
| int i = 1.; 
| ----------------- 
| yields 
|   g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc  
|   x.cc:1: warning: initialization to `int' from `double' 
|   x.cc:1: warning: argument to `int' from `double' 
| which is not only duplicated, but also seems 
| a) grammatically wrong in the first line (shouldn't it be 
|    "initialization OF 'int' from 'double'"?) 
| b) nonsensical in the second line: it's not an argument TO 
|    a FUNCTION "int", it's the argument to the ASSIGNMENT 
|    to int 
|  
| Highly bogus... 

Completely agreed.  Even more so, I think the diagnostic should NOT be
emitted when the compiler does know for sure that the target can
accurately hold the initializer with no loss (which is the case here).

Will look into this after 3.3.3

-- Gaby


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13932



More information about the Gcc-bugs mailing list