This is the mail archive of the gcc-bugs@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]

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


------- 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


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