1
0
mirror of https://github.com/cc65/cc65.git synced 2026-04-19 09:28:25 +00:00
Commit Graph

3793 Commits

Author SHA1 Message Date
paul moore 9b5d11abde fix blank lines 2024-03-18 16:08:13 -07:00
paul moore 1f1f2c5a68 move options, add doc 2024-03-18 16:04:49 -07:00
paul moore c43557d4ed complete first version 2023-12-03 13:58:04 -08:00
paul moore d21616ea71 initial commit 2023-12-02 09:16:49 -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 2af16ee82b Merge pull request #2271 from acqn/InternalFix
[cc65] Fixed assertion failure when there is an undeclared symbol used in a parameter list
2023-11-28 15:03:09 +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
Bob Andrews ad0b778008 Merge pull request #2265 from acqn/C99Main
[cc65] Enabled implicit "return 0" in C99 standard main function in default cc65 mode
2023-11-28 14:27:55 +01:00
Bob Andrews 7e6399d439 Merge pull request #2268 from picocomputer/master
add rp6502 target
2023-11-27 17:53:43 +01:00
acqn 546be1d5dd Fixed assertion failure when there is an undefined symbol used in a parameter list. 2023-11-27 20:42:50 +08: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
acqn ac04394254 Fixed and improved diagnostics about declaration errors. 2023-11-27 20:39:15 +08:00
acqn 79214530e0 Maximum total count of errors before the compiler unconditionally bails out is now 200.
If more than 20 errors occur on the same source line, the compiler will immediately bail out.
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
rumbledethumps b17c4d3434 add rp6502 target 2023-11-16 18:46:16 -08:00
acqn f6c3a1b209 Removed the extra "'}' expected" error message following a "Excess elements in struct/union initializer" error message. 2023-11-15 21:17:05 +08:00
acqn 5332eeecc2 Fixed empty declarations in structs/unions. 2023-11-15 18:17:36 +08:00
Colin Leroy-Mira 076137f41b Optimize lda/sta/lda and friends 2023-11-13 10:32:09 +01:00
Colin Leroy-Mira 9242508abf Optimize substraction of 1 2023-11-13 10:31:48 +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 d424883716 Fixed diagnostics on qualifiers of function return types. 2023-10-28 15:24:13 +08:00
acqn 8e62cbf092 Improved checks on function return types. 2023-09-13 22:26:41 +08:00
Bob Andrews f381d23001 Merge pull request #2236 from acqn/TypeFix
[cc65] Fixed some type-related bugs which don't have any impact yet
2023-10-29 12:37:07 +01:00
Bob Andrews f7cf14bf58 Merge pull request #2246 from acqn/ArrayFix
[cc65] Fixes for nested unspecified-length/flexible arrays
2023-10-29 12:10:30 +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 94ef5856d0 Merge pull request #2235 from acqn/Cleanup
[cc65] Cleanups
2023-10-26 20:07:39 +02:00
Bob Andrews 401bcaa5ff Merge pull request #2237 from acqn/CGType
[cc65] Renamed type facility functions for deciding code generation type flags
2023-10-26 19:50:10 +02: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 10f709eeb7 Merge pull request #2234 from acqn/Diagnostics
[cc65] Minor fix for error recovery from duplicated struct members
2023-10-26 17:10:01 +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
Bob Andrews a8d00bfaae Merge pull request #2240 from acqn/BitwiseOpt
[cc65] New TOS optimization steps for 8-bit subtraction and bitwise operations
2023-10-26 16:53:37 +02:00
acqn df392fc104 Fixed type promotion of switch case values. 2023-10-25 22:38:21 +08:00
acqn a31b35b2a6 Fixed naming of local variables in CG_TypeOfBySize and CG_TypeOf. 2023-10-22 10:42:17 +08:00
acqn 70549e868e New optimizer steps to restore some possibly lost optimization with boolean due to the previous fix. 2023-10-21 23:56:13 +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
acqn 79c52e742f Added new opts OptBoolUnary1/OptBoolUnary2 to remove unnecessary cmp + bcastax/bnegax,
as well as OptBoolUnary3 to "strength-reduce" certain bcastax/bnegax to boolne/booleq.
2023-10-21 23:56:04 +08:00
acqn e5bbdfa995 Separated boolean optimizers from bitwise unary operator optimizers.
Renamed OptCmp6 to OptBoolCmp.
2023-10-21 23:56:01 +08:00
acqn c52427fc65 Minor fix for error recovery from duplicated struct members. 2023-10-21 23:52:14 +08: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 7b0d1d9679 Added warning on concatenated string literals in _Pragma operations. 2023-10-13 14:54:54 +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 c6ead99b00 Fixed string literal concatenation with pragmas in between. 2023-10-13 16:32:05 +08:00
acqn 7b6f8249a0 General fixes for prerequisites for optimization on certain std functions.
Added utility functions for extracting expression info.
2023-10-11 22:29:15 +08:00
acqn 20c3e994c6 Fixed compiling with pragmas in the middle of declarations or statements. 2023-10-04 21:22:04 +08:00