[Bug c++/58305] Deprecation warning for class not raised when not assigning to a variable

2013-09-04 Thread languitar at semipol dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58305

--- Comment #7 from Johannes Wienke  ---
Thanks!


[Bug c++/58305] Deprecation warning for class not raised when not assigning to a variable

2013-09-04 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58305

Paolo Carlini  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Paolo Carlini  ---
Fixed for 4.9.0.


[Bug c++/58305] Deprecation warning for class not raised when not assigning to a variable

2013-09-04 Thread paolo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58305

--- Comment #5 from 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  

PR c++/58305
* typeck2.c (build_functional_cast): Maybe warn_deprecated_use.

/testsuite
2013-09-03  Paolo Carlini  

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


[Bug c++/58305] Deprecation warning for class not raised when not assigning to a variable

2013-09-03 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58305

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


[Bug c++/58305] Deprecation warning for class not raised when not assigning to a variable

2013-09-03 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58305

Paolo Carlini  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  ---
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.


[Bug c++/58305] Deprecation warning for class not raised when not assigning to a variable

2013-09-03 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58305

Paolo Carlini  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  ---
Ok, this seems easy to fix.


[Bug c++/58305] Deprecation warning for class not raised when not assigning to a variable

2013-09-03 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58305

Paolo Carlini  changed:

   What|Removed |Added

 Status|WAITING |NEW


[Bug c++/58305] Deprecation warning for class not raised when not assigning to a variable

2013-09-03 Thread languitar at semipol dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58305

--- Comment #2 from Johannes Wienke  ---
class ToBeDeprecated {
} __attribute__ ((deprecated ("deprecated!")));

int main() {
ToBeDeprecated();
ToBeDeprecated x;
return 0;
}

The first use does not issue the warning, the second does.


[Bug c++/58305] Deprecation warning for class not raised when not assigning to a variable

2013-09-03 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58305

Paolo Carlini  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2013-09-03
 Ever confirmed|0   |1

--- Comment #1 from Paolo Carlini  ---
Please provide a self-contained reproducer, what you provided doesn't compile
at all.