Kugel Fuhr
3c5269dede
Warn for braces around a pointer initializer.
2024-09-08 09:11:47 +02:00
Bob Andrews
5e5dd1d6c4
Merge pull request #2498 from kugelfuhr/kugelfuhr/fix-include-in-macros
...
Fix .include within .macro/.repeat
2024-09-01 23:26:33 +02:00
Bob Andrews
2680bc8dec
Merge pull request #2495 from kugelfuhr/kugelfuhr/dont-save-stuff-in-main
...
Generate shorter code for main() in some cases
2024-09-01 22:54:45 +02:00
Kugel Fuhr
b2aceaea24
Fix behavior of .INCLUDE within a macro or .REPEAT. In the original code
...
.INCLUDE was executed after expansion of the macro or .REPEAT - which was
wrong and caused all sorts of unexpected behavior. Related issues/PRs
are #231 , #1473 , #2159 and maybe others.
Note: After this change error messages for nested macro/.include statements
may be wrong. This is an unrelated bug that was always there and got exposed
by this fix. The bug needs to be addressed in a separate PR.
2024-09-01 19:58:07 +02:00
Bob Andrews
7a578be724
Merge pull request #2491 from kugelfuhr/kugelfuhr/fix-2431
...
Fix issue #2431
2024-09-01 19:35:32 +02:00
Bob Andrews
a712fbb8f9
Merge pull request #2493 from kugelfuhr/kugelfuhr/fix-1663
...
Fix issue #1663 .
2024-09-01 18:07:14 +02:00
Bob Andrews
601deab3a2
Merge pull request #2492 from kugelfuhr/kugelfuhr/alternative-pragma-names
...
Allow alternative names for pragmas that contain underlines instead of dashes
2024-09-01 17:57:38 +02:00
Bob Andrews
4b38974918
Merge pull request #2496 from kugelfuhr/kugelfuhr/fix-2458
...
Fix macro preprocessing for #include
2024-09-01 17:54:36 +02:00
Kugel Fuhr
b4aef6eac4
Fix macro preprocessing for #include. Arguments enclosed in "" or <> must not
...
be preprocessed. See ISO/IEC 9899 1990 (E) section 6.8.2.
2024-09-01 13:16:35 +02:00
Kugel Fuhr
b5cc68d6e2
Do not save any register variables when entering main(). Do not restore the C
...
stack when leaving main(). Both are unnecessary and just bloat the executable.
2024-09-01 12:41:25 +02:00
Kugel Fuhr
4b68d19993
Fix issue #1663 .
2024-09-01 10:42:18 +02:00
Kugel Fuhr
35c3fe5d0a
Fix issue #2044 . While doing so, cleanup copy&pasted code.
2024-09-01 10:29:59 +02:00
Kugel Fuhr
ef17250c64
Fixed a compiler warning.
2024-09-01 10:26:45 +02:00
Kugel Fuhr
ba263d13a7
Allow alternative #pragma names using underscores.
2024-09-01 10:22:57 +02:00
Kugel Fuhr
58b1c21996
Removed #pragma names that have been obsolete for over a decade.
2024-09-01 10:22:40 +02:00
Evgeny Vrublevsky
c500cb9086
Add support of unnamed labels with @ (.localchar) prefix.
2024-04-07 13:34:48 +03:00
Bob Andrews
25967e65b5
Merge pull request #2424 from acqn/Cleanup
...
[cc65] Cleanups in src/cc65/declare.c
2024-03-10 02:39:14 +01:00
Bob Andrews
a372ead4de
Merge pull request #2334 from carlo-bramini/fix-sim65-1
...
[SIM65] Support undocumented opcodes for 6502
2024-03-10 00:37:18 +01:00
Bob Andrews
081d18f7d7
Merge pull request #2422 from acqn/SubFix
...
[cc65] Fixed potential errors with subtraction evaluation of identifiers at different memory locations
2024-03-09 13:02:27 +01:00
acqn
731f349b24
Removed ParamTypeCvt().
2024-02-29 18:24:22 +08:00
acqn
98767741ce
Reorganized stuff in src/cc65/declare.c.
2024-02-29 18:24:22 +08:00
acqn
9b2d27d1e1
Fixed the error recovery integer type used for bit-fields.
2024-02-29 18:23:04 +08:00
acqn
23aa562094
Fixed potential errors with subtraction evaluation of identifiers at different memory locations.
2024-02-24 15:34:38 +08:00
Stefan
ab0eb4fe58
oops
2024-02-15 09:03:46 +01:00
Stefan
8d4946b3f4
Fixed segv
...
touch /tmp/xx
grc65 /tmp/xx
2024-02-15 07:52:42 +01:00
Carlo Bramini
b04d79b1da
[SIM65] Support undocumented opcodes for 6502
...
This PR is mostly a complete rewrite of the emulator for 6502/65c02 opcodes.
It provides an easier to maintain implementation of the instructions, by using few macros rather than having hand-written code for each function.
All undocumented, previously missing opcodes for 6502 are also implemented.
The patch also includes a detailed documentation of those opcodes, for reference to developers.
This PR should fix one of the milestones listed here for the next version of CC65:
https://github.com/cc65/wiki/wiki/Before-the-next-release
2024-02-08 12:13:17 +01:00
Bob Andrews
eb503cc542
Merge pull request #2390 from colinleroy/implement-shifts-by-7
...
Implement aslax7/shlax7/asrax7/shrax7
2024-02-02 20:17:48 +01:00
acqn
96d55e3703
Fixed optimization for char-size bitwise XOR/OR/AND when the rhs operand is complicated.
2024-02-02 19:00:33 +08:00
Colin Leroy-Mira
7d7cf2d1e0
Implement aslax7/shlax7/asrax7/shrax7
2024-01-29 07:59:11 +01:00
Colin Leroy-Mira
0dd7b0c3a5
Implement __sysremove for sim65
...
This will allow using unlink()/remove() in sim65 programs
Use it to unlink fgets' test output file
2024-01-28 13:58:57 +01:00
Bob Andrews
6c7106c9d9
Merge pull request #2377 from acqn/Diagnostics
...
[cc65] Diagnosis improvements
2024-01-23 22:16:35 +01:00
Bob Andrews
ea83b9fa53
Merge pull request #2347 from acqn/SrcFile
...
[cc65] fixes and enhancements for source file info in diagnosis and debug output
2024-01-23 22:15:31 +01:00
acqn
ba75a2ac26
Added missing checks for forward declarations of the main() function.
...
More accurate diagnosis on implicit 'int' type specifiers.
2024-01-23 14:33:05 +08:00
Bob Andrews
bea2e86210
Merge pull request #2354 from acqn/Diagnostics
...
[cc65] Improved diagnosis
2024-01-22 19:09:51 +01:00
Bob Andrews
998dfd6fa7
Merge pull request #2370 from acqn/VisibilityFix
...
[cc65] Fixed visibility of undeclared functions and objects
2024-01-22 18:31:47 +01:00
acqn
e9bd9330c0
Added warning on some code patterns of faulty attempt to declare anonymous structs/unions.
...
Removed unnecessary warning on tagless enum/struct/unions that would be invisible out of a function declaration.
2024-01-15 23:56:42 +08:00
acqn
07e349c517
Skipped anonymous tag names in diagnosis on empty structs/unions.
2024-01-15 23:56:39 +08:00
acqn
afdf398a0b
Fixed repeated diagnosis when reading EOF in certain cases.
2024-01-15 23:56:11 +08:00
acqn
de3087a7e9
Removed the extra "unused parameter" warning when the parameter had an duplicated identifier error.
2024-01-14 00:19:11 +08:00
acqn
0b06c34dfc
Added primitive support for the ISO C99 inline feature as well as the __inline__ extension.
...
No inlining is actually done but that part is not required by the standard.
2024-01-14 00:08:41 +08:00
acqn
9471e128b5
Fixed segname pragmas right after a function definition.
2024-01-18 20:59:46 +08:00
Colin Leroy-Mira
db8ac355cb
Cleaner updating of instructions
2024-01-16 09:33:33 +01:00
Colin Leroy-Mira
dec65176f0
Fix #2357 - Copy est.size and flags of op when moving it
2024-01-16 08:45:20 +01:00
Bob Andrews
2c4ebe812c
Revert "Fix #2357 - Copy est.size and flags of op when moving it"
2024-01-15 23:03:13 +01:00
Bob Andrews
8e25a7b376
Merge pull request #2359 from colinleroy/fix-2357
...
Fix #2357 - Copy est.size and flags of op when moving it
2024-01-15 23:00:09 +01:00
Colin Leroy-Mira
b388ca0236
Fix #2357 - Copy est.size and flags of op when moving it
2024-01-15 21:51:17 +01:00
acqn
7e80e55b6d
Added a warning on implicit int in typedefs.
2024-01-13 16:40:44 +08:00
acqn
3d0dc58153
Fixed visibility of undeclared functions and objects.
2024-01-13 00:46:14 +08:00
Bob Andrews
8c329dfd1a
Merge pull request #2344 from acqn/Cleanup
...
[cc65] Cleanup for symbol types and flags
2024-01-12 16:02:08 +01:00
Bob Andrews
28f892bb3c
Merge pull request #2345 from acqn/PtrFix
...
[cc65] Fixed regression on comparison to null pointer
2024-01-11 16:50:49 +01:00