acqn
1e4d1b4311
Fixed function declarator parser when a parameter has a function type.
...
Ensured check on parameter lists without types in non-definition declarations.
2023-12-14 02:34:03 +08:00
acqn
f8fe1d1560
Fixed missing diagnosis on function parameter lists with trailing commas.
2023-12-13 22:57:32 +08:00
Bob Andrews
bc97bce8c1
Merge pull request #2297 from acqn/WrappedCall
...
[cc65] Fixed wrapped call when the function was defined before its later declaration gets wrapped with the pragma
2023-12-12 17:11:47 +01:00
acqn
befc9533c6
More accurate diagnostic messages on empty declarations without any type specifiers.
2023-12-10 20:21:50 +08:00
mrdudz
6b855d562a
use -std=gnu17 for the references, so the test bench will not break with GCC 14. see #2277
2023-12-10 23:18:55 +01:00
Bob Andrews
cc5e9c38ca
Merge pull request #2296 from acqn/Diagnostics
...
[cc65] Fixed and improved diagnostics regarding type names and declarations
2023-12-10 22:32:33 +01:00
mrdudz
b31a1c7c0c
test for regression that occured after #2262
2023-12-10 22:18:59 +01:00
acqn
bbd542fac7
Fixed missing diagnosis on extra identifiers in type names.
2023-12-10 17:01:54 +08:00
acqn
79b4690077
Fixed missing diagnostics on empty enum/struct/union declareations without tag names.
...
Improved error recovery with local declarations and _Static_assert.
2023-12-10 15:43:24 +08:00
Bob Andrews
92f869cdfb
Merge pull request #2288 from acqn/TypeFix
...
[cc65] Fixed an iteration bug in type composition
2023-12-09 22:15:24 +01:00
Bob Andrews
a956f6f9ed
Merge pull request #2289 from acqn/FuncDeclFix
...
[cc65] Fixed the issue that qualifiers of pointees of function parameters were ignored for type compatibility check
2023-12-09 22:14:41 +01:00
Bob Andrews
9e19a2e6a3
Merge pull request #2290 from acqn/TestFix
...
Updated test/misc/Makefile
2023-12-09 22:12:59 +01:00
acqn
b66682a05b
Fixed wrapped call when the function to wrap has already got defined before it is wrapped with the pragma.
2023-12-10 00:47:10 +08:00
Colin Leroy-Mira
2a2cc6cad6
Fix bug introduced in #2260
...
bne should have applied to A, not X, but adding a cmp #$00 before
makes the change less optimized than the existing.
2023-12-09 16:43:23 +01:00
acqn
d8e61552be
Removed outdated testcases no longer in the directory from test/misc/Makefile.
2023-12-09 18:04:29 +08:00
acqn
98ffc031d1
Fixed an iteration bug in type composition.
2023-12-09 14:35:00 +08:00
acqn
b7e7bb7489
Fixed the issue that qualifiers of pointees of function parameters were ignored for type compatibility check.
2023-12-09 14:34:37 +08:00
Bob Andrews
66bfc31988
Merge pull request #2262 from colinleroy/optimize-long-assign
...
Optimize static long assignment a bit
2023-12-08 01:58:01 +01:00
Bob Andrews
09735b26c5
Merge pull request #2274 from acqn/UnionFix
...
[cc65] Fixed initialization of union when it has an anonymous bit-field as the first member declaration
2023-12-08 01:55:06 +01:00
Colin Leroy-Mira
d8a3938f2b
Optimize a bit static long assignation
2023-12-01 14:20:00 +01:00
acqn
6434176909
Fixed constness of bit-fields.
2023-11-29 12:27:01 +08:00
Bob Andrews
5537b61e6a
Merge pull request #2272 from acqn/Diagnostics
...
[cc65] Improved diagnostics
2023-11-28 15:06:39 +01:00
Bob Andrews
97cfb8c67a
Merge pull request #2266 from acqn/StructFix
...
[cc65] Fixes for structs/unions
2023-11-28 15:00:58 +01:00
Bob Andrews
86b09f56a6
Merge pull request #2260 from colinleroy/optimize-substraction
...
Optimize integer decrements by 1
2023-11-28 14:40:51 +01:00
Bob Andrews
acf159adbc
Merge pull request #2269 from colinleroy/optimize_gt_255
...
Optimize unsigned int and long > 255
2023-11-28 14:36:39 +01:00
acqn
b99ebc1256
Fixed diagnostic messages about undeclared identifiers.
2023-11-27 20:39:15 +08:00
acqn
7574e36e95
Improved error recovery with function declarations.
...
Fixed some rare cases when a single file-scope error could get reapeated endlessly until the maximum total count of errors allowed is reached.
2023-11-27 20:39:15 +08:00
Colin Leroy-Mira
3066b1f9b4
Optimize unsigned int and long > 255
2023-11-17 22:49:03 +01:00
acqn
3b7af398a9
Fixed initialization of union when it has an anonymous bit-field as the first member declaration.
2023-11-15 21:32:24 +08:00
acqn
5332eeecc2
Fixed empty declarations in structs/unions.
2023-11-15 18:17:36 +08:00
Colin Leroy-Mira
b3eca51264
Add int decrement tests
2023-11-13 10:32:27 +01:00
acqn
0eb38770bd
Fixed const qualifiers on named structs/unions members that should prevent assignments to the whole structs/unions.
...
Added warning on ignored qualifiers on anonymous structs/unions.
2023-11-13 17:17:46 +08:00
Colin Leroy-Mira
cff611711b
Optimize multiplication by zero
2023-11-06 11:04:00 +01:00
acqn
8e45a4c960
Fixed the bug that a union type containing a struct with a flexible array member was accepted as a struct member or array element type.
2023-10-27 23:46:10 +08:00
acqn
85e63e99a6
Fixed regression: array element of incomplete type.
2023-10-27 21:51:45 +08:00
Bob Andrews
16f6860f57
Merge pull request #2243 from acqn/StdFuncFix
...
[cc65] Inlined std functions fixes
2023-10-26 17:39:07 +02:00
Bob Andrews
316ae886d7
Merge pull request #2242 from acqn/SwitchFix
...
[cc65] Fixed type promotion of switch case values
2023-10-26 16:56:01 +02:00
acqn
df392fc104
Fixed type promotion of switch case values.
2023-10-25 22:38:21 +08:00
acqn
f321bb16e5
Fixed potential bugs with boolean branch optimizers when more than one jeq/jne follows.
2023-10-21 23:56:07 +08:00
Bob Andrews
3e60268243
add newline at the end
2023-10-17 20:39:15 +02:00
acqn
178573a128
Fixed inlined strlen when it takes a string literal with extra characters after the first '\0'.
...
Added testcases.
2023-10-17 17:57:19 +08:00
acqn
8111946731
Fixed array subscript with a bit-field with patch by kugelfuhr.
2023-10-15 15:53:03 +08:00
acqn
25832ef5fc
Fixed timing of #pragma charmap.
...
Now it is immediately applied and affects almost all characters and string literals after it.
Exceptions:
- String literals as the message of a static assertion or inline assembler code (only the required one, not any optional formatted arguments) in an asm() expression are not translated with either #pragma charmap or target presets.
- String literals used for preprocessor directives or as the result of stringized macro arguments are never translated.
2023-10-13 16:32:06 +08:00
acqn
20c3e994c6
Fixed compiling with pragmas in the middle of declarations or statements.
2023-10-04 21:22:04 +08:00
acqn
03ceeb4ad1
Removed warning on implicit "return 0" in C99 standard main function in default cc65 mode.
2022-10-22 12:45:51 +08:00
acqn
2324bd62f6
If __A__,__AX__ or __EAX__ is used, post-inc/dec within the same statement will not modify it.
...
Moved testcase from src/test/todo to src/test/val plus minor improvement on portability.
2021-06-08 14:16:14 +08:00
Bob Andrews
494bf10e80
Merge pull request #2216 from acqn/FuncDefFix
...
[cc65] Type category in a function definition cannot be inherited from a typedef
2023-10-08 18:58:29 +02:00
acqn
0028b14071
The type category in a function definition cannot be inherited from a typedef.
2023-10-05 17:48:16 +08:00
Bob Andrews
12193790e5
Merge pull request #2199 from acqn/FAMFix
...
[cc65] Forbidden struct itself with flexible array member as struct member or array element
2023-10-05 03:21:31 +02:00
Bob Andrews
327281b869
Merge pull request #2200 from acqn/CompoundInitFix
...
[cc65] Fixed compound initialization with certain omitted enclosing curly braces
2023-10-05 03:20:33 +02:00
acqn
13e1ed3e7b
Fixed compound initialization with omitted enclosing curly braces when an array/struct/union to initialize is nested.
2023-09-22 10:29:52 +08:00
acqn
51e304f10f
Added check for total arguments size for variadic functions.
2023-09-18 16:44:04 +08:00
acqn
fc603129da
A structure with a flexible array member shall not be a member of a structure or an element of an array according to the ISO C Standard.
2023-09-18 15:44:58 +08:00
acqn
39abd233fe
Fixed check for conflicting extern vs no-linkage/static declarations in functions.
2023-09-17 23:47:22 +08:00
Bob Andrews
043590c971
Merge pull request #2182 from colinleroy/add-ntohs
...
Add ntohs/htons and ntohl/htonl
2023-09-08 18:47:09 +02:00
Bob Andrews
537aa665cf
Merge pull request #2006 from bbbradsmith/ca65_jmp_abs_wrap_error
...
jmp (abs) wrap warning promoted to an error, suppressed on 65C02/etc
2023-09-08 18:26:55 +02:00
Colin Leroy-Mira
dfe7562f76
Add ntohs, htons, ntohl, htons.
2023-09-07 07:03:34 +02:00
Bob Andrews
05cd805cbc
Merge pull request #2085 from bbbradsmith/numerical_constant_errors-float
...
Numerical constant errors and improvements (float)
2023-08-25 22:30:07 +02:00
bbbradsmith
f31d8efc1e
tabs are forbidden
2023-08-19 15:07:32 -04:00
bbbradsmith
07f08fc547
tests verifying jmp (indirect) page crossing error on 6502, and the lack of error for other CPU types
2023-08-19 14:36:30 -04:00
mrdudz
c8aa9cc703
add struct assign check related to #2079
2023-05-29 17:20:09 +02:00
Bob Andrews
652949f183
Merge pull request #2104 from Movax12/remove-feature-requirement-addrsize
...
ca65: Remove .feature requirement for .addrsize
2023-05-22 00:39:04 +02:00
Bob Andrews
9ff7b88192
Merge pull request #2113 from polluks2/patch-9
...
Unified NULL #2110
2023-05-19 16:06:46 +02:00
polluks2
8ff008722b
Fixed test
...
Don't define NULL yourself. QED
2023-05-19 02:49:49 +02:00
Bob Andrews
70bf4d492b
Merge pull request #2105 from bbbradsmith/sim65-64bit-cycle-count
...
Sim65 64bit cycle count
2023-05-16 15:53:23 +02:00
bbbradsmith
5a30d746b4
extern/static conflict test: remove warning as errors to match the new expected cases
2023-05-11 20:15:27 -04:00
bbbradsmith
3419cbd348
sim65 64-bit cycle count tests
...
These take ~10 seconds to run locally
2023-05-07 16:33:47 -04:00
bbbradsmith
aad64063c9
makefiles no longer need comment about sim65 64-bit support
2023-05-07 16:33:07 -04:00
mvax
bee29dedd1
fix feature.s test
2023-05-06 17:11:57 -04:00
mvax
560085cb17
modify and add tests
2023-05-06 16:22:04 -04:00
Bob Andrews
9c70235173
Merge pull request #2096 from Movax12/BugFix-for-ismnemonic-function
...
Bugfix for the .ISMNEMONIC, .ISMNEM builtin function
2023-05-06 21:42:59 +02:00
Bob Andrews
9c27084fa5
Merge pull request #2084 from bbbradsmith/numerical_constant_errors-int
...
Numerical constant errors and improvements (integer)
2023-05-06 21:36:59 +02:00
Bob Andrews
7b40515506
Merge pull request #2099 from bbbradsmith/split2092-sim65-fix
...
sim65 fix platform-dependent issues
2023-05-06 20:36:59 +02:00
bbbradsmith
84f0ab322d
sim65: cycles does not increment 1 at a time, so some small overhead is needed in range check
2023-05-06 13:54:28 -04:00
mvax
fe35386b79
add test - add overloading instruction test
2023-05-06 12:56:34 -04:00
bbbradsmith
df749abbfb
libtest target alternative to libs
...
saves me about 20 minutes if I only want to run tests
2023-05-05 21:56:52 -04:00
bbbradsmith
f2e7609046
sim65 cycles 32-bit range fix
...
long is 64-bit on some platforms, making this inconsistent, added range check to catch overflow.
reduced tests requesting 5 billion cycles to 2^32-1 so they can fun on 32-bit long sim65.
2023-05-05 21:45:57 -04:00
mvax
dd0a2bf1bc
add test - fix stlye
2023-05-05 19:10:16 -04:00
mvax
7994889213
add test - fix again
2023-05-05 19:07:14 -04:00
mvax
c5cf32ac47
add test - fix
2023-05-05 18:50:44 -04:00
mvax
18570d18b8
add test
2023-05-05 18:43:10 -04:00
Bob Andrews
a325c95652
Merge pull request #2090 from bbbradsmith/split2089-make-test-standard
...
add test/standard to test makefile
2023-05-05 20:42:57 +02:00
Bob Andrews
7a040978d7
Merge pull request #2088 from bbbradsmith/struct-3byte-misc-todo
...
guard test to ensure 3-byte struct isn't re-enabled without evaluation by accident
2023-05-05 20:39:37 +02:00
bbbradsmith
5c20fb2812
test/todo makefile uses testwrk/val by mistake
2023-05-05 11:28:42 -04:00
bbbradsmith
9f3e47e9c9
test/standard was never added to test makefile
2023-05-05 11:04:31 -04: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
Bob Andrews
a7676bdff5
Merge pull request #2075 from bbbradsmith/struct-duplicate-member-error
...
Error for struct/union with a duplicate member
2023-05-04 22:43:17 +02:00
bbbradsmith
84eafb7f9c
err test for struct with duplicate member
2023-05-03 21:09:03 -04:00
bbbradsmith
b5f255f912
Test case for const-overflow warnings
2023-05-03 19:54:40 -04:00
bbbradsmith
e3cb8dfb9b
Numerical constant scanner requires explicitly 32-bit sized type for cross-platform consistency
2023-05-03 19:27:37 -04:00
Bob Andrews
45bdeb62ad
Merge pull request #2070 from bbbradsmith/fix2060
...
RHS primary integer promotion must happen after loading the primary, not before
2023-05-03 23:57:19 +02:00
bbbradsmith
49bd568113
error test for integer constant too large for internal representation
2023-05-03 17:55:02 -04:00
bbbradsmith
e3887d7ead
Test to demonstrate availability of floating point constants, document the possibility.
2023-05-03 16:48:02 -04:00
Bob Andrews
ae7a1416fe
Revert "Revert "Forbid 3-byte struct pass/return by value, document struct value pass/return""
2023-05-03 20:02:12 +02:00
Brad Smith
2c47ea45af
bug895.c compliant token pasting syntax to remove warnings
...
Gets rid of some unnecessary warning spam in the test log of lines like this:
```
bug895.c:95: Warning: Pasting formed "unsigned_long_14(", an invalid preprocessing token
```
2023-05-02 18:18:10 -04:00
bbbradsmith
1c26b1cf1b
RHS primary integer promotion must happen after loading the primary, not before. See: #2060
2023-05-02 14:42:00 -04:00
bbbradsmith
99220f60af
test/asm readme val description revision
2023-03-07 18:53:30 -05:00
bbbradsmith
6be7c16013
linkter test with custom config should not use none.lib
2023-03-07 18:48:30 -05:00
bbbradsmith
4732e937ad
overwrite segment tests
...
asm/listing linker CFG support
asm and asm/listing test documentation
2023-03-07 18:44:56 -05:00
Bob Andrews
b9cf6266e7
Merge pull request #2010 from bbbradsmith/ca65_brk_optional_signature
...
optional BRK signature on all 6502 CPUs, not just 65816
2023-03-04 13:21:28 +01:00