public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/63871] New: -Weffc++ does not understand type deduction for return types
@ 2014-11-14 14:21 david at doublewise dot net
  2014-11-14 14:36 ` [Bug c++/63871] " redi at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: david at doublewise dot net @ 2014-11-14 14:21 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 63871
           Summary: -Weffc++ does not understand type deduction for return
                    types
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: david at doublewise dot net

Source file:


class C {};
auto && operator++(C & c) {
    return c;
}

int main() {
}



gcc-4.9 source/main.cpp -Weffc++ -std=c++1y
source/main.cpp:112:25: warning: prefix ‘auto&& operator++(C&)’ should return
‘C&’ [-Weffc++]
 auto && operator++(C & c) {



I get the same error with the return type specified as `auto &` or
`decltype(auto)`.
>From gcc-bugs-return-466770-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Nov 14 14:36:30 2014
Return-Path: <gcc-bugs-return-466770-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 9174 invoked by alias); 14 Nov 2014 14:36:30 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 9120 invoked by uid 48); 14 Nov 2014 14:36:26 -0000
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/16166] -Weffc++ finer granularity
Date: Fri, 14 Nov 2014 14:36:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.0.0
X-Bugzilla-Keywords: diagnostic
X-Bugzilla-Severity: enhancement
X-Bugzilla-Who: redi at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P2
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-16166-4-mMKhCnad9s@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-16166-4@http.gcc.gnu.org/bugzilla/>
References: <bug-16166-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-11/txt/msg01242.txt.bz2
Content-length: 182

https://gcc.gnu.org/bugzilla/show_bug.cgi?id\x16166

--- Comment #10 from Jonathan Wakely <redi at gcc dot gnu.org> ---
*** Bug 63871 has been marked as a duplicate of this bug. ***


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

* [Bug c++/63871] -Weffc++ does not understand type deduction for return types
  2014-11-14 14:21 [Bug c++/63871] New: -Weffc++ does not understand type deduction for return types david at doublewise dot net
@ 2014-11-14 14:36 ` redi at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: redi at gcc dot gnu.org @ 2014-11-14 14:36 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
-Weffc++ hasn't been updated or maintained in years, it still uses the rules
form the 1st edition of Effective C++ ... I wish people would stop using it.

PR 16166 is the place where -Weffc++ PRs go to die.

*** This bug has been marked as a duplicate of bug 16166 ***


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

end of thread, other threads:[~2014-11-14 14:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-14 14:21 [Bug c++/63871] New: -Weffc++ does not understand type deduction for return types david at doublewise dot net
2014-11-14 14:36 ` [Bug c++/63871] " redi at gcc dot gnu.org

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