public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/94669] New: libcc1/libcc1.cc; 2 * minor performance problem
@ 2020-04-20 11:35 dcb314 at hotmail dot com
  2020-04-20 12:13 ` [Bug c/94669] libcc1: 4 " dcb314 at hotmail dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: dcb314 at hotmail dot com @ 2020-04-20 11:35 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94669
           Summary: libcc1/libcc1.cc; 2 * minor performance problem
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

cppcheck says:

1.

trunk.git/libcc1/libcc1.cc:112:57: performance: Function parameter
'driver_filename' should be passed by const reference. [passedByValue]

Source code is

    compiler_driver_filename (libcc1 *self, std::string driver_filename)

Maybe better code

    compiler_driver_filename (libcc1 *self, const std::string &
driver_filename)

2.

trunk.git/libcc1/libcc1.cc:96:56: performance: Function parameter
'triplet_regexp' should be passed by const reference. [passedByValue]

    compiler_driver_filename (libcc1 *self, std::string driver_filename)

Duplicate.

In a similar position:

trunk.git/libcc1/libcp1.cc:114:57: performance: Function parameter
'driver_filename' should be passed by const reference. [passedByValue]

and 

trunk.git/libcc1/libcp1.cc:98:56: performance: Function parameter
'triplet_regexp' should be passed by const reference. [passedByValue]

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

end of thread, other threads:[~2022-01-05 18:26 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-20 11:35 [Bug c/94669] New: libcc1/libcc1.cc; 2 * minor performance problem dcb314 at hotmail dot com
2020-04-20 12:13 ` [Bug c/94669] libcc1: 4 " dcb314 at hotmail dot com
2020-04-20 18:23 ` jan.kratochvil at redhat dot com
2020-04-20 18:33 ` dcb314 at hotmail dot com
2020-04-21 15:35 ` egallager at gcc dot gnu.org
2021-01-22 23:05 ` tromey at gcc dot gnu.org
2021-05-05  6:10 ` cvs-commit at gcc dot gnu.org
2022-01-05 10:24 ` dcb314 at hotmail dot com
2022-01-05 18:22 ` tromey at gcc dot gnu.org
2022-01-05 18:26 ` 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).