public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58305] New: Deprecation warning for class not raised when not assigning to a variable
@ 2013-09-03 11:43 languitar at semipol dot de
2013-09-03 12:17 ` [Bug c++/58305] " paolo.carlini at oracle dot com
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: languitar at semipol dot de @ 2013-09-03 11:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58305
Bug ID: 58305
Summary: Deprecation warning for class not raised when not
assigning to a variable
Product: gcc
Version: 4.6.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: languitar at semipol dot de
Deprecation warnings for classes do not work in case the class is used but not
assigned to a variable. The following code snippet illustrates the error:
class ToBeDeprecated {
} __attribute__ ((deprecated ("deprecated!")));
ToBeDeprecated()
Despite using the class, no deprecation warning is shown. If I change the use
to
ToBeDeprecated x;
a warning is shown.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/58305] Deprecation warning for class not raised when not assigning to a variable
2013-09-03 11:43 [Bug c++/58305] New: Deprecation warning for class not raised when not assigning to a variable languitar at semipol dot de
@ 2013-09-03 12:17 ` paolo.carlini at oracle dot com
2013-09-03 12:21 ` languitar at semipol dot de
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-09-03 12:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58305
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2013-09-03
Ever confirmed|0 |1
--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Please provide a self-contained reproducer, what you provided doesn't compile
at all.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/58305] Deprecation warning for class not raised when not assigning to a variable
2013-09-03 11:43 [Bug c++/58305] New: Deprecation warning for class not raised when not assigning to a variable languitar at semipol dot de
2013-09-03 12:17 ` [Bug c++/58305] " paolo.carlini at oracle dot com
@ 2013-09-03 12:21 ` languitar at semipol dot de
2013-09-03 12:24 ` paolo.carlini at oracle dot com
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: languitar at semipol dot de @ 2013-09-03 12:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58305
--- Comment #2 from Johannes Wienke <languitar at semipol dot de> ---
class ToBeDeprecated {
} __attribute__ ((deprecated ("deprecated!")));
int main() {
ToBeDeprecated();
ToBeDeprecated x;
return 0;
}
The first use does not issue the warning, the second does.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/58305] Deprecation warning for class not raised when not assigning to a variable
2013-09-03 11:43 [Bug c++/58305] New: Deprecation warning for class not raised when not assigning to a variable languitar at semipol dot de
2013-09-03 12:17 ` [Bug c++/58305] " paolo.carlini at oracle dot com
2013-09-03 12:21 ` languitar at semipol dot de
@ 2013-09-03 12:24 ` paolo.carlini at oracle dot com
2013-09-03 13:14 ` paolo.carlini at oracle dot com
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-09-03 12:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58305
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/58305] Deprecation warning for class not raised when not assigning to a variable
2013-09-03 11:43 [Bug c++/58305] New: Deprecation warning for class not raised when not assigning to a variable languitar at semipol dot de
` (2 preceding siblings ...)
2013-09-03 12:24 ` paolo.carlini at oracle dot com
@ 2013-09-03 13:14 ` paolo.carlini at oracle dot com
2013-09-03 19:46 ` paolo.carlini at oracle dot com
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-09-03 13:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58305
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |paolo.carlini at oracle dot com
--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Ok, this seems easy to fix.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/58305] Deprecation warning for class not raised when not assigning to a variable
2013-09-03 11:43 [Bug c++/58305] New: Deprecation warning for class not raised when not assigning to a variable languitar at semipol dot de
` (3 preceding siblings ...)
2013-09-03 13:14 ` paolo.carlini at oracle dot com
@ 2013-09-03 19:46 ` paolo.carlini at oracle dot com
2013-09-04 0:56 ` paolo.carlini at oracle dot com
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-09-03 19:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58305
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |NEW
Assignee|paolo.carlini at oracle dot com |unassigned at gcc dot gnu.org
--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Unfortunately not trivial to do, because, per the general rules about
deprecated types, given:
typedef ToBeDeprecated NotToBeDeprecated;
we do *not* warn to warn for either:
NotToBeDeprecated();
NotToBeDeprecated y;
Anyway, not a regression, icc behaves like gcc, etc: the issue has to wait a
bit.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/58305] Deprecation warning for class not raised when not assigning to a variable
2013-09-03 11:43 [Bug c++/58305] New: Deprecation warning for class not raised when not assigning to a variable languitar at semipol dot de
` (4 preceding siblings ...)
2013-09-03 19:46 ` paolo.carlini at oracle dot com
@ 2013-09-04 0:56 ` paolo.carlini at oracle dot com
2013-09-04 8:57 ` paolo at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-09-04 0:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58305
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |paolo.carlini at oracle dot com
Target Milestone|--- |4.9.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/58305] Deprecation warning for class not raised when not assigning to a variable
2013-09-03 11:43 [Bug c++/58305] New: Deprecation warning for class not raised when not assigning to a variable languitar at semipol dot de
` (5 preceding siblings ...)
2013-09-04 0:56 ` paolo.carlini at oracle dot com
@ 2013-09-04 8:57 ` paolo at gcc dot gnu.org
2013-09-04 8:58 ` paolo.carlini at oracle dot com
2013-09-04 9:03 ` languitar at semipol dot de
8 siblings, 0 replies; 10+ messages in thread
From: paolo at gcc dot gnu.org @ 2013-09-04 8:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58305
--- Comment #5 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Wed Sep 4 08:57:26 2013
New Revision: 202242
URL: http://gcc.gnu.org/viewcvs?rev=202242&root=gcc&view=rev
Log:
/cp
2013-09-03 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58305
* typeck2.c (build_functional_cast): Maybe warn_deprecated_use.
/testsuite
2013-09-03 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58305
* g++.dg/warn/deprecated-8.C: New.
Added:
trunk/gcc/testsuite/g++.dg/warn/deprecated-8.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/typeck2.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/58305] Deprecation warning for class not raised when not assigning to a variable
2013-09-03 11:43 [Bug c++/58305] New: Deprecation warning for class not raised when not assigning to a variable languitar at semipol dot de
` (6 preceding siblings ...)
2013-09-04 8:57 ` paolo at gcc dot gnu.org
@ 2013-09-04 8:58 ` paolo.carlini at oracle dot com
2013-09-04 9:03 ` languitar at semipol dot de
8 siblings, 0 replies; 10+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-09-04 8:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58305
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #6 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Fixed for 4.9.0.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/58305] Deprecation warning for class not raised when not assigning to a variable
2013-09-03 11:43 [Bug c++/58305] New: Deprecation warning for class not raised when not assigning to a variable languitar at semipol dot de
` (7 preceding siblings ...)
2013-09-04 8:58 ` paolo.carlini at oracle dot com
@ 2013-09-04 9:03 ` languitar at semipol dot de
8 siblings, 0 replies; 10+ messages in thread
From: languitar at semipol dot de @ 2013-09-04 9:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58305
--- Comment #7 from Johannes Wienke <languitar at semipol dot de> ---
Thanks!
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2013-09-04 9:03 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-03 11:43 [Bug c++/58305] New: Deprecation warning for class not raised when not assigning to a variable languitar at semipol dot de
2013-09-03 12:17 ` [Bug c++/58305] " paolo.carlini at oracle dot com
2013-09-03 12:21 ` languitar at semipol dot de
2013-09-03 12:24 ` paolo.carlini at oracle dot com
2013-09-03 13:14 ` paolo.carlini at oracle dot com
2013-09-03 19:46 ` paolo.carlini at oracle dot com
2013-09-04 0:56 ` paolo.carlini at oracle dot com
2013-09-04 8:57 ` paolo at gcc dot gnu.org
2013-09-04 8:58 ` paolo.carlini at oracle dot com
2013-09-04 9:03 ` languitar at semipol dot de
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).