public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug modula2/108136] New: Modula2 meets cppcheck
@ 2022-12-15 20:04 dcb314 at hotmail dot com
2023-01-12 19:43 ` [Bug modula2/108136] " gaius at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: dcb314 at hotmail dot com @ 2022-12-15 20:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108136
Bug ID: 108136
Summary: Modula2 meets cppcheck
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: modula2
Assignee: gaius at gcc dot gnu.org
Reporter: dcb314 at hotmail dot com
Target Milestone: ---
I ran the C/C++ static analyser cppcheck over the source code of the Modula2
compiler and library.
For errors, this one might be significant:
trunk.d1/gcc/m2/pge-boot/GRTco.c:113:1: error: Found an exit path from function
with non-void return type that has missing return statement [missingReturn]
For style:
trunk.d1/gcc/m2/mc-boot/GM2Dependent.c:453:15: style: Array index 'i' is used
before limits check. [arrayIndexThenCheck]
trunk.d1/gcc/m2/pge-boot/GM2Dependent.c:461:15: style: Array index 'i' is used
before limits check. [arrayIndexThenCheck]
trunk.d1/gcc/m2/mc-boot/GArgs.c:86:42: style: Array index 'j' is used before
limits check. [arrayIndexThenCheck]
trunk.d1/gcc/m2/pge-boot/GArgs.c:84:42: style: Array index 'j' is used before
limits check. [arrayIndexThenCheck]
trunk.d1/gcc/m2/mc-boot/Gkeyc.c:603:241: style: Same expression 'seenUIntMax'
found multiple times in chain of '||' operators. [duplicateExpression]
trunk.d1/gcc/m2/mc-boot/Gkeyc.c:603:128: style: Same expression 'seenUIntMin'
found multiple times in chain of '||' operators. [duplicateExpression]
for performance, relatively little:
trunk.d1/gcc/m2/mc-boot/Gdecl.c:14011:58: performance: Function parameter 's'
should be passed by const reference. [passedByValue]
trunk.d1/gcc/m2/mc-boot/Gdecl.c:16906:57: performance: Function parameter 's'
should be passed by const reference. [passedByValue]
trunk.d1/gcc/m2/mc-boot/Gdecl.c:16918:64: performance: Function parameter 's'
should be passed by const reference. [passedByValue]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug modula2/108136] Modula2 meets cppcheck
2022-12-15 20:04 [Bug modula2/108136] New: Modula2 meets cppcheck dcb314 at hotmail dot com
@ 2023-01-12 19:43 ` gaius at gcc dot gnu.org
2023-01-12 19:46 ` gaius at gcc dot gnu.org
2023-01-20 23:43 ` gaius at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: gaius at gcc dot gnu.org @ 2023-01-12 19:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108136
Gaius Mulley <gaius at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2023-01-12
Status|UNCONFIRMED |ASSIGNED
Ever confirmed|0 |1
--- Comment #1 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Many thanks for the bug report! I've generated a patch to fix the two cases of
*RTco*.c in the tree.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug modula2/108136] Modula2 meets cppcheck
2022-12-15 20:04 [Bug modula2/108136] New: Modula2 meets cppcheck dcb314 at hotmail dot com
2023-01-12 19:43 ` [Bug modula2/108136] " gaius at gcc dot gnu.org
@ 2023-01-12 19:46 ` gaius at gcc dot gnu.org
2023-01-20 23:43 ` gaius at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: gaius at gcc dot gnu.org @ 2023-01-12 19:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108136
--- Comment #2 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Created attachment 54260
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54260&action=edit
Add missing return statement to RTco_select
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug modula2/108136] Modula2 meets cppcheck
2022-12-15 20:04 [Bug modula2/108136] New: Modula2 meets cppcheck dcb314 at hotmail dot com
2023-01-12 19:43 ` [Bug modula2/108136] " gaius at gcc dot gnu.org
2023-01-12 19:46 ` gaius at gcc dot gnu.org
@ 2023-01-20 23:43 ` gaius at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: gaius at gcc dot gnu.org @ 2023-01-20 23:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108136
Gaius Mulley <gaius at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gaius at gcc dot gnu.org
--- Comment #3 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Created attachment 54323
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54323&action=edit
Fix for the style bugs mentioned in the PR
Here is a patch committed, pushed and bootstrap tested for the style category
bugs (para 2).
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-01-20 23:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-15 20:04 [Bug modula2/108136] New: Modula2 meets cppcheck dcb314 at hotmail dot com
2023-01-12 19:43 ` [Bug modula2/108136] " gaius at gcc dot gnu.org
2023-01-12 19:46 ` gaius at gcc dot gnu.org
2023-01-20 23:43 ` gaius 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).