public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/47461] New: warn_unused_result attribute ignored for templates
@ 2011-01-25 16:45 ian at airs dot com
  2011-01-25 16:56 ` [Bug c++/47461] " redi at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: ian at airs dot com @ 2011-01-25 16:45 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: warn_unused_result attribute ignored for templates
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ian@airs.com


When I compile this C++ code with current mainline


class C {
 public:
  template<typename T> bool f(T* m) __attribute__((warn_unused_result));
};
template<typename T> inline bool C::f(T* m) { return true; }
void f(C* pc) { int i; pc->f(&i); }

I should see a warning for the call to pc->f.  However, I see no warnings.

I do see a warning for a member function which is not a template.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/47461] warn_unused_result attribute ignored for templates
  2011-01-25 16:45 [Bug c++/47461] New: warn_unused_result attribute ignored for templates ian at airs dot com
@ 2011-01-25 16:56 ` redi at gcc dot gnu.org
  2015-08-12 14:19 ` paolo.carlini at oracle dot com
  2015-08-12 14:49 ` paolo.carlini at oracle dot com
  2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2011-01-25 16:56 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.01.25 16:53:13
     Ever Confirmed|0                           |1

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-01-25 16:53:13 UTC ---
confirmed. probably related to PR 29823


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/47461] warn_unused_result attribute ignored for templates
  2011-01-25 16:45 [Bug c++/47461] New: warn_unused_result attribute ignored for templates ian at airs dot com
  2011-01-25 16:56 ` [Bug c++/47461] " redi at gcc dot gnu.org
@ 2015-08-12 14:19 ` paolo.carlini at oracle dot com
  2015-08-12 14:49 ` paolo.carlini at oracle dot com
  2 siblings, 0 replies; 4+ messages in thread
From: paolo.carlini at oracle dot com @ 2015-08-12 14:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47461

--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Let's add a testcase and close the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/47461] warn_unused_result attribute ignored for templates
  2011-01-25 16:45 [Bug c++/47461] New: warn_unused_result attribute ignored for templates ian at airs dot com
  2011-01-25 16:56 ` [Bug c++/47461] " redi at gcc dot gnu.org
  2015-08-12 14:19 ` paolo.carlini at oracle dot com
@ 2015-08-12 14:49 ` paolo.carlini at oracle dot com
  2 siblings, 0 replies; 4+ messages in thread
From: paolo.carlini at oracle dot com @ 2015-08-12 14:49 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47461

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |4.9.0

--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Done.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-08-12 14:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-25 16:45 [Bug c++/47461] New: warn_unused_result attribute ignored for templates ian at airs dot com
2011-01-25 16:56 ` [Bug c++/47461] " redi at gcc dot gnu.org
2015-08-12 14:19 ` paolo.carlini at oracle dot com
2015-08-12 14:49 ` paolo.carlini at oracle 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).