public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13932] New: [3.3/3.4/3.5 regression] duplicate warning message for conversion
@ 2004-01-30 14:49 bangerth at dealii dot org
2004-01-30 14:49 ` [Bug c++/13932] " bangerth at dealii dot org
` (7 more replies)
0 siblings, 8 replies; 10+ messages in thread
From: bangerth at dealii dot org @ 2004-01-30 14:49 UTC (permalink / raw)
To: gcc-bugs
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...
This is a regression against 2.95 which simply said
g/x> /home/bangerth/bin/gcc-2.95.3/bin/c++ -c x.cc
x.cc:1: warning: initialization to `int' from `double'
which is both short and precise.
W.
--
Summary: [3.3/3.4/3.5 regression] duplicate warning message for
conversion
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bangerth at dealii dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13932
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/13932] [3.3/3.4/3.5 regression] duplicate warning message for conversion
2004-01-30 14:49 [Bug c++/13932] New: [3.3/3.4/3.5 regression] duplicate warning message for conversion bangerth at dealii dot org
@ 2004-01-30 14:49 ` bangerth at dealii dot org
2004-01-30 16:03 ` gdr at integrable-solutions dot net
` (6 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: bangerth at dealii dot org @ 2004-01-30 14:49 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |3.3.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13932
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/13932] [3.3/3.4/3.5 regression] duplicate warning message for conversion
2004-01-30 14:49 [Bug c++/13932] New: [3.3/3.4/3.5 regression] duplicate warning message for conversion bangerth at dealii dot org
2004-01-30 14:49 ` [Bug c++/13932] " bangerth at dealii dot org
@ 2004-01-30 16:03 ` gdr at integrable-solutions dot net
2004-01-30 17:23 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: gdr at integrable-solutions dot net @ 2004-01-30 16:03 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/13932] [3.3/3.4/3.5 regression] duplicate warning message for conversion
2004-01-30 14:49 [Bug c++/13932] New: [3.3/3.4/3.5 regression] duplicate warning message for conversion bangerth at dealii dot org
2004-01-30 14:49 ` [Bug c++/13932] " bangerth at dealii dot org
2004-01-30 16:03 ` gdr at integrable-solutions dot net
@ 2004-01-30 17:23 ` pinskia at gcc dot gnu dot org
2004-02-05 5:20 ` cvs-commit at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-30 17:23 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-01-30 17:23 -------
Confirmed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-01-30 17:23:31
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13932
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/13932] [3.3/3.4/3.5 regression] duplicate warning message for conversion
2004-01-30 14:49 [Bug c++/13932] New: [3.3/3.4/3.5 regression] duplicate warning message for conversion bangerth at dealii dot org
` (2 preceding siblings ...)
2004-01-30 17:23 ` pinskia at gcc dot gnu dot org
@ 2004-02-05 5:20 ` cvs-commit at gcc dot gnu dot org
2004-02-05 5:22 ` cvs-commit at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-02-05 5:20 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-02-05 05:20 -------
Subject: Bug 13932
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_4-branch
Changes by: mmitchel@gcc.gnu.org 2004-02-05 05:20:31
Modified files:
gcc/cp : ChangeLog call.c typeck.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/warn: conv2.C
Log message:
PR c++/13932
* call.c (convert_like_real): Use "converting" rather than
"argument" as the descriptive keyword to
dubious_conversion_warnings.
* typeck.c (convert_for_assignment): Do not call
dubious_conversion_warnings.
PR c++/13932
* g++.dg/warn/conv2.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3892.2.36&r2=1.3892.2.37
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/call.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.452.2.5&r2=1.452.2.6
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/typeck.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.519.2.4&r2=1.519.2.5
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.53&r2=1.3389.2.54
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/warn/conv2.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13932
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/13932] [3.3/3.4/3.5 regression] duplicate warning message for conversion
2004-01-30 14:49 [Bug c++/13932] New: [3.3/3.4/3.5 regression] duplicate warning message for conversion bangerth at dealii dot org
` (3 preceding siblings ...)
2004-02-05 5:20 ` cvs-commit at gcc dot gnu dot org
@ 2004-02-05 5:22 ` cvs-commit at gcc dot gnu dot org
2004-02-05 5:23 ` [Bug c++/13932] [3.3 " mmitchel at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-02-05 5:22 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-02-05 05:22 -------
Subject: Bug 13932
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: mmitchel@gcc.gnu.org 2004-02-05 05:22:21
Modified files:
gcc/cp : ChangeLog call.c typeck.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/warn: conv2.C
Log message:
PR c++/13932
* call.c (convert_like_real): Use "converting" rather than
"argument" as the descriptive keyword to
dubious_conversion_warnings.
* typeck.c (convert_for_assignment): Do not call
dubious_conversion_warnings.
PR c++/13932
* g++.dg/warn/conv2.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3936&r2=1.3937
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/call.c.diff?cvsroot=gcc&r1=1.457&r2=1.458
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/typeck.c.diff?cvsroot=gcc&r1=1.524&r2=1.525
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3471&r2=1.3472
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/warn/conv2.C.diff?cvsroot=gcc&r1=1.1&r2=1.2
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13932
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/13932] [3.3 regression] duplicate warning message for conversion
2004-01-30 14:49 [Bug c++/13932] New: [3.3/3.4/3.5 regression] duplicate warning message for conversion bangerth at dealii dot org
` (4 preceding siblings ...)
2004-02-05 5:22 ` cvs-commit at gcc dot gnu dot org
@ 2004-02-05 5:23 ` mmitchel at gcc dot gnu dot org
2004-02-22 16:27 ` cvs-commit at gcc dot gnu dot org
2004-02-22 16:27 ` gdr at gcc dot gnu dot org
7 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-02-05 5:23 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-02-05 05:23 -------
Fixed in GCC 3.4.
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|[3.3/3.4/3.5 regression] |[3.3 regression] duplicate
|duplicate warning message |warning message for
|for conversion |conversion
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13932
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/13932] [3.3 regression] duplicate warning message for conversion
2004-01-30 14:49 [Bug c++/13932] New: [3.3/3.4/3.5 regression] duplicate warning message for conversion bangerth at dealii dot org
` (5 preceding siblings ...)
2004-02-05 5:23 ` [Bug c++/13932] [3.3 " mmitchel at gcc dot gnu dot org
@ 2004-02-22 16:27 ` cvs-commit at gcc dot gnu dot org
2004-02-22 16:27 ` gdr at gcc dot gnu dot org
7 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-02-22 16:27 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-02-22 16:27 -------
Subject: Bug 13932
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_3-branch
Changes by: gdr@gcc.gnu.org 2004-02-22 16:27:38
Modified files:
gcc/cp : ChangeLog call.c typeck.c
Added files:
gcc/testsuite/g++.dg/warn: conv2.C
Log message:
Backport from mainline
2004-02-04 Mark Mitchell <mark@codesourcery.com>
PR c++/13932
* call.c (convert_like_real): Use "converting" rather than
"argument" as the descriptive keyword to
dubious_conversion_warnings.
* typeck.c (convert_for_assignment): Do not call
dubious_conversion_warnings.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.3076.2.249&r2=1.3076.2.250
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/call.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.341.2.38&r2=1.341.2.39
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/typeck.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.436.2.20&r2=1.436.2.21
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/warn/conv2.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.2.6.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13932
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/13932] [3.3 regression] duplicate warning message for conversion
2004-01-30 14:49 [Bug c++/13932] New: [3.3/3.4/3.5 regression] duplicate warning message for conversion bangerth at dealii dot org
` (6 preceding siblings ...)
2004-02-22 16:27 ` cvs-commit at gcc dot gnu dot org
@ 2004-02-22 16:27 ` gdr at gcc dot gnu dot org
7 siblings, 0 replies; 10+ messages in thread
From: gdr at gcc dot gnu dot org @ 2004-02-22 16:27 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From gdr at gcc dot gnu dot org 2004-02-22 16:27 -------
Backport fix from mainline.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13932
^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <bug-13932-102@http.gcc.gnu.org/bugzilla/>]
end of thread, other threads:[~2006-07-08 13:22 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-30 14:49 [Bug c++/13932] New: [3.3/3.4/3.5 regression] duplicate warning message for conversion bangerth at dealii dot org
2004-01-30 14:49 ` [Bug c++/13932] " bangerth at dealii dot org
2004-01-30 16:03 ` gdr at integrable-solutions dot net
2004-01-30 17:23 ` pinskia at gcc dot gnu dot org
2004-02-05 5:20 ` cvs-commit at gcc dot gnu dot org
2004-02-05 5:22 ` cvs-commit at gcc dot gnu dot org
2004-02-05 5:23 ` [Bug c++/13932] [3.3 " mmitchel at gcc dot gnu dot org
2004-02-22 16:27 ` cvs-commit at gcc dot gnu dot org
2004-02-22 16:27 ` gdr at gcc dot gnu dot org
[not found] <bug-13932-102@http.gcc.gnu.org/bugzilla/>
2006-07-08 13:22 ` lopezibanez at gmail dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).