public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug analyzer/98679] New: Four functions could be marked "const". @ 2021-01-14 12:21 dcb314 at hotmail dot com 2021-01-14 12:36 ` [Bug analyzer/98679] " redi at gcc dot gnu.org ` (3 more replies) 0 siblings, 4 replies; 5+ messages in thread From: dcb314 at hotmail dot com @ 2021-01-14 12:21 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98679 Bug ID: 98679 Summary: Four functions could be marked "const". Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: analyzer Assignee: dmalcolm at gcc dot gnu.org Reporter: dcb314 at hotmail dot com Target Milestone: --- 1. trunk.git/gcc/analyzer/analyzer.h:172:8: style:inconclusive: Technically the member function 'ana::region_offset::operator==' can be const. [functionConst] 2. trunk.git/gcc/analyzer/pending-diagnostic.h:160:8: style:inconclusive: Technically the member function 'ana::pending_diagnostic::equal_p' can be const. [functionConst] 3. trunk.git/gcc/analyzer/store.h:427:8: style:inconclusive: Technically the member function 'ana::binding_cluster::for_each_value' can be const. [functionConst] 4. trunk.git/gcc/analyzer/store.h:462:8: style:inconclusive: Technically the member function 'ana::binding_cluster::for_each_binding' can be const. [functionConst] I checked each of these and they looked like a plausible enhancement. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug analyzer/98679] Four functions could be marked "const". 2021-01-14 12:21 [Bug analyzer/98679] New: Four functions could be marked "const" dcb314 at hotmail dot com @ 2021-01-14 12:36 ` redi at gcc dot gnu.org 2021-01-14 15:05 ` dmalcolm at gcc dot gnu.org ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: redi at gcc dot gnu.org @ 2021-01-14 12:36 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98679 Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Last reconfirmed| |2021-01-14 Status|UNCONFIRMED |NEW --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to David Binderman from comment #0) > 1. > > trunk.git/gcc/analyzer/analyzer.h:172:8: style:inconclusive: Technically the > member function 'ana::region_offset::operator==' can be const. > [functionConst] This should absolutely be const. Comparison operators that don't work with const objects are broken. > > 2. > > trunk.git/gcc/analyzer/pending-diagnostic.h:160:8: style:inconclusive: > Technically the member function 'ana::pending_diagnostic::equal_p' can be > const. [functionConst] The same argument applies here since it's effectively operator==. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug analyzer/98679] Four functions could be marked "const". 2021-01-14 12:21 [Bug analyzer/98679] New: Four functions could be marked "const" dcb314 at hotmail dot com 2021-01-14 12:36 ` [Bug analyzer/98679] " redi at gcc dot gnu.org @ 2021-01-14 15:05 ` dmalcolm at gcc dot gnu.org 2021-01-14 20:30 ` cvs-commit at gcc dot gnu.org 2021-01-14 21:00 ` dmalcolm at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: dmalcolm at gcc dot gnu.org @ 2021-01-14 15:05 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98679 David Malcolm <dmalcolm at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #2 from David Malcolm <dmalcolm at gcc dot gnu.org> --- Thanks. Am testing a fix. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug analyzer/98679] Four functions could be marked "const". 2021-01-14 12:21 [Bug analyzer/98679] New: Four functions could be marked "const" dcb314 at hotmail dot com 2021-01-14 12:36 ` [Bug analyzer/98679] " redi at gcc dot gnu.org 2021-01-14 15:05 ` dmalcolm at gcc dot gnu.org @ 2021-01-14 20:30 ` cvs-commit at gcc dot gnu.org 2021-01-14 21:00 ` dmalcolm at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: cvs-commit at gcc dot gnu.org @ 2021-01-14 20:30 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98679 --- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by David Malcolm <dmalcolm@gcc.gnu.org>: https://gcc.gnu.org/g:8a18261afd923151b8d2a37f667e4673b27acd3f commit r11-6689-g8a18261afd923151b8d2a37f667e4673b27acd3f Author: David Malcolm <dmalcolm@redhat.com> Date: Thu Jan 14 15:25:27 2021 -0500 analyzer: const fixes [PR98679] gcc/analyzer/ChangeLog: PR analyzer/98679 * analyzer.h (region_offset::operator==): Make const. * pending-diagnostic.h (pending_diagnostic::equal_p): Likewise. * store.h (binding_cluster::for_each_value): Likewise. (binding_cluster::for_each_binding): Likewise. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug analyzer/98679] Four functions could be marked "const". 2021-01-14 12:21 [Bug analyzer/98679] New: Four functions could be marked "const" dcb314 at hotmail dot com ` (2 preceding siblings ...) 2021-01-14 20:30 ` cvs-commit at gcc dot gnu.org @ 2021-01-14 21:00 ` dmalcolm at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: dmalcolm at gcc dot gnu.org @ 2021-01-14 21:00 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98679 David Malcolm <dmalcolm at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED --- Comment #4 from David Malcolm <dmalcolm at gcc dot gnu.org> --- Should be fixed by the above commit. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-01-14 21:00 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-01-14 12:21 [Bug analyzer/98679] New: Four functions could be marked "const" dcb314 at hotmail dot com 2021-01-14 12:36 ` [Bug analyzer/98679] " redi at gcc dot gnu.org 2021-01-14 15:05 ` dmalcolm at gcc dot gnu.org 2021-01-14 20:30 ` cvs-commit at gcc dot gnu.org 2021-01-14 21:00 ` dmalcolm 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).