From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 22ADC3971C3F; Fri, 8 May 2020 16:14:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 22ADC3971C3F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1588954458; bh=p5P1ahCjo2PvDgWAKTmW+Dn80XdZ13ysSIZ1ZlezeuQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=wzvtXHnKOzbitvrqjJnWaapTgdnwXgmwEAbHHE+xld0cjCIat4R7JagTgStSUFYUq w2cHf3ce6/0uJlmKEIhCmIhw7vG6eNjgG1pLXznMDLExXYjIgzY/aCNLvA3VGzcetf H9HA0gpl4if9RfRVGPiPpV8/9qWmR0WeYEPJTrhI= From: "dcb314 at hotmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/94997] gcc/cp/call.c: 4 * member function could be const ? Date: Fri, 08 May 2020 16:14:18 +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: unknown X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: enhancement X-Bugzilla-Who: dcb314 at hotmail dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: DUPLICATE X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 May 2020 16:14:18 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94997 --- Comment #3 from David Binderman --- (In reply to Martin Sebor from comment #1) > Assuming this is meant to be an enhancement request to add new option to > suggest to make member functions const the same enhancement request has > already been raised in pr80711, so resolving as a dupe. It is an enhancement request, but for one source code file only, not the implementation of the feature in gcc. > (I don't suppose you are just noting that the four instances of the messa= ge > below would be solved by marking the functions const. There must be many > more such opportunities in GCC, as well as countless others where const > could be put to good use.) Indeed, all I am doing is noting four places where const could be used. However, cppcheck did look at the general case of all of the source code of the gcc compiler and it found 237 places. I only mentioned four in this bug report, to keep things simple. List attached.=