1
0
mirror of https://github.com/cc65/cc65.git synced 2026-04-20 02:17:07 +00:00
Commit Graph

122 Commits

Author SHA1 Message Date
Kugel Fuhr 228671b7c4 Added another test. 2025-07-26 10:17:32 +02:00
Kugel Fuhr 8f4a4040d6 Complete unreachable checking for switch statements. 2025-07-26 09:03:27 +02:00
Kugel Fuhr 70c1bd5e3c Improved flow analysis in general and especially for "for" loops. Added more
tests.
2025-07-26 09:03:04 +02:00
Kugel Fuhr 6d45a94127 Do not output a warning about a missing "return" in a function if the function
exit is unreachable.
2025-07-17 17:07:34 +02:00
Kugel Fuhr ed54e9b168 Added several flow control tests. 2025-07-17 16:00:59 +02:00
Kugel Fuhr 93b94d314a Implement a simple flow analysis. Tracks control flow of all statements with
the exception of "switch". Outputs warnings for unreachable code. Tracks also
"return" but doesn't currently make use of this information.
2025-07-17 15:39:45 +02:00
mrdudz cb4cd114bf handle -s correctly when using these makefiles directly 2025-06-29 22:48:03 +02:00
mrdudz 70f9723a89 dumb down for cmd.exe 2025-06-26 20:42:15 +02:00
mrdudz 7a85575158 fix handling of QUIET in the "test" directory 2025-06-26 19:48:16 +02:00
Gorilla Sapiens 8cb0578447 changes suggested by mrdudz 2025-06-18 06:38:38 +00:00
Gorilla Sapiens dd2f19260c added information to Makefile output 2025-06-04 03:03:18 +00:00
Kugel Fuhr b5b7ea422e Make sure, the command line setting for the "Unreachable code" warning is
checked in all cases before outputting such a warning. Fixes #2655.
2025-05-21 11:04:21 +02:00
Gorilla Sapiens f13f2cb619 fixes issue #2637 2025-05-03 02:41:08 +00:00
mrdudz 7dc09fdb05 add test related to bug#2515 / pr#2518 2024-09-15 19:22:16 +02:00
acqn 3d0dc58153 Fixed visibility of undeclared functions and objects. 2024-01-13 00:46:14 +08:00
acqn d8e61552be Removed outdated testcases no longer in the directory from test/misc/Makefile. 2023-12-09 18:04:29 +08:00
bbbradsmith cfc8a41a03 guard test to ensure 3-byte struct isn't re-enabled without evaluation by accident 2023-05-04 17:07:34 -04:00
mrdudz 2b941e255a move test. oops 2022-12-11 12:22:41 +01:00
mrdudz ddab16007a run branch fixer again after replacing BRA by JMP. should fix #1936 2022-12-11 12:08:30 +01:00
acqn cc177208b4 Added tests for diagnostics in unevaluated context. 2022-11-12 21:05:01 +08:00
Bob Andrews ace39197e5 move test to test/ref 2022-11-11 21:22:20 +01:00
Bob Andrews 9c48c0ab8a Merge pull request #1900 from acqn/Diagnostics
[cc65] Fixed endlessly repeated error messages when a declaration lacks a required identifier
2022-11-11 21:08:53 +01:00
acqn 9253f0d6bc Added testcase for #1889. 2022-11-10 02:11:54 +08:00
acqn 8a7f566387 Fixed support for storage class specifiers after type specifiers. 2022-11-03 21:46:42 +08:00
mrdudz cc450706d1 testcase related to bug #1888 2022-11-03 18:03:47 +01:00
mrdudz ce6ee1b891 test some more possible cases and move test into test/val 2022-08-28 03:43:54 +02:00
mrdudz 168f42bb83 fix whitespace 2022-08-27 02:14:52 +02:00
mrdudz 41b29d5c81 add testcase related to issue #1252 2022-08-27 02:10:02 +02:00
mrdudz 90b9438b48 added testcase related to issue #1768 2022-08-27 01:15:06 +02:00
acqn 2f357ba9b2 Preprocessor directives can now appear in the argument list of function-like macro calls.
#pragma PP-tokens can now be macro replaced.
#include header names directly enclosed in <> are free of macro replacement.
Preprocess-only mode (-E) now outputs with #line as source info.
Moved testcases for #760 and #1357.
Added testcase for #1643.
2022-07-26 21:10:38 +08:00
mrdudz 0129622383 remove dangling spaces 2022-04-17 16:07:52 +02:00
mrdudz 6001d3eab9 fix #warning directive so the test could actually compile :) 2022-03-07 14:48:55 +01:00
mrdudz 010eea12a2 move test for issue #1211 into misc 2021-05-25 13:38:06 +02:00
mrdudz adda9438d2 testcase for issue #1357 2021-05-24 13:53:14 +02:00
mrdudz d736032675 added a missing comment 2021-05-17 14:25:33 +02:00
Andrea Odetti 467844963a Update failing test due to error format changes. 2021-05-11 17:41:59 +02:00
acqn 5f8d163045 Moved one test case for #1209. 2021-04-06 22:20:39 +02:00
acqn 5d05451ab2 Fixed test case for Issue #1263. 2021-04-03 17:50:46 +02:00
acqn cb8fbf4772 Removed the non-existing-in-C "struct/union scope" for structs/unions.
Fixed handling of struct/union field declarations without identifiers, which do nothing.
2021-03-29 19:28:22 +02:00
mrdudz 02392d6220 added test related to issue #1437 2021-03-26 22:18:05 +01:00
acqn 131f96eb1e Moved testcase for issue #1397. 2021-02-17 07:03:11 -05:00
mrdudz ab8bb26868 added testcase for issue #1937 2021-02-09 19:50:08 +01:00
acqn 95830cce29 Fixed test/misc/bug1265.c with its output. 2021-01-30 14:31:51 +01:00
acqn a040c28cc4 Moved test for #1374. 2021-01-19 14:33:27 +01:00
mrdudz 0846219672 added testprogram for issue #1374 2021-01-16 16:40:58 +01:00
Greg King b2c1a77bb3 Fixed the cc65 code that optimizes 16-bit compares when the high bytes are known to be equal.
Only the low bytes are compared.  Originally, signed 16-bit compares were optimized into signed 8-bit compares.  But, the sign bits are in the high bytes; and, they're equal.  Therefore, the low bytes always must be compared as unsigned numbers.
Fixes #1348.
2020-12-24 12:27:09 -05:00
Greg King 8b42f570e9 Fixed code that caused a seg-fault after parsing a (deferred) post-count argument followed by a (nested) function-call argument.
The old broken code defers the count until the end of the (parent function's) argument list.  But, a nested function call clears the pointer to the deferred type.  That leads to an access violation.
The new code defers only until the end of each argument.  Fixes #1320.
2020-11-20 17:45:14 -05:00
mrdudz c11e389a94 move testcase for issue #1320 into test/misc 2020-11-20 17:25:10 +01:00
mrdudz 23273584a0 testcase for issue #1348 2020-11-19 23:12:16 +01:00
Greg King b0497f40b2 'test/isequal.c' doesn't change. Don't rebuild it for each test subdirectory. 2020-11-17 13:40:36 -05:00