1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-16 09:29:32 +00:00
Commit Graph

3495 Commits

Author SHA1 Message Date
Rutger van Bergen
2b07204952
Merge branch 'cc65:master' into kim1 2022-09-19 20:03:23 +02:00
Rutger van Bergen
cb8cb876ec Add documentation, make capitalization uniform 2022-09-19 19:56:57 +02:00
mrdudz
fd6d00a4dd revert 6096a24 - this breaks the case when the "label" is an expression containing spaces.
fixes bug #1853
2022-09-17 14:41:59 +02:00
mrdudz
253af1ed07 Force 16bit address for absolute-indirect-x-indexed in 65816 mode.
should fix issue #1846 (and hopefully not break anything :))
2022-09-03 18:36:40 +02:00
acqn
dc001cb4be Reverted E_ADDRESS_OF logic fix.
Added testcase.
2022-09-01 12:56:46 +08:00
mrdudz
d371046ae4 Despite not technically needed, it seems to be desirable to remove all trailing whitespace from inline assembly 2022-08-28 03:43:02 +02:00
mrdudz
6096a24f1d dont add whitespace after a label to the actual label, this fixes the root cause of #1252 2022-08-28 03:41:48 +02:00
acqn
43d2fd2a96 Added support for the popular __COUNTER__ macro. 2022-07-24 23:19:05 +08:00
Bob Andrews
d2628d5949
Merge pull request #1840 from acqn/FnParamFix
[cc65] Fixed function parameters declared as function types rather than function pointers
2022-08-26 23:19:55 +02:00
Bob Andrews
68610490c9
Merge pull request #1837 from acqn/PPLineFix
[cc65] Fixed predefined __FILE__, __LINE__ and added missing preprocessing directive #line
2022-08-26 23:12:59 +02:00
acqn
26945c32ac Fixed function parameters declared as function types rather than function pointers. 2022-08-24 15:30:52 +08:00
acqn
57ad7c8766 Improved diagnostics about C++ style comments for c89. 2022-08-22 14:31:53 +08:00
acqn
fd7f32ecd3 Improved error handling and diagnostics with failed macro definitions. 2022-08-22 14:31:51 +08:00
acqn
9565f41381 Improved Diagnostic with #include. 2022-08-19 13:27:56 +08:00
acqn
5d5bd472c6 Removed extra whitespace at line ends in preprocess-only output (-E).
Increased threshold from 5 to 7 for skipped newlines with #line directives in preprocess-only output (-E).
2022-08-22 00:27:21 +08:00
acqn
79f97e7714 Reused code more for macros in preprocessing directives. 2022-08-22 00:24:28 +08:00
acqn
bb9c98f4c9 Added support for the #line directive. 2022-07-24 23:19:05 +08:00
acqn
36123c9c8f Improved naming for stuff related to preprocessing directives. 2022-07-24 23:19:05 +08:00
acqn
624e5025b0 Fixed parsing wide char constants. 2022-08-17 22:28:00 +08:00
acqn
5cca1e8b1d Fixed parsing numeric constants. 2022-08-11 10:55:16 +08:00
acqn
4bb4f033ea Fixed the bug that C keywords were not simply recognized as identifiers in preprocessing. 2022-08-07 16:14:45 +08:00
acqn
7a139a800e Added # and ## as punctuators recognized by the tokenizer.
Reorganized the token enum.
2022-08-06 18:45:49 +08:00
Bob Andrews
12b9b10355
Merge pull request #1832 from acqn/PPDefineFix
[cc65] Preprocessor directive #define fixes
2022-08-20 14:27:25 +02:00
Bob Andrews
03421694b2
Merge pull request #1817 from acqn/PPFix
[cc65] More preprocessor fixes
2022-08-19 21:37:16 +02:00
acqn
3fbefdef45 Fixed warning on forward declaration of enums.
Fixed the issue that global static variables put on zeropage were missing optimization.
2022-08-19 18:48:52 +08:00
acqn
cf7558add3 Added check for ## at either end of macro expansion. 2022-08-18 23:16:29 +08:00
acqn
47d5e74a6e Modified way to keep undefined macro handling more consistent. 2022-08-18 22:51:23 +08:00
Bob Andrews
ec310fceb8
Merge pull request #1825 from ReallyNiceGuy/master
Revert: Parse file included inside a macro at definition time
2022-08-11 00:03:12 +02:00
acqn
78e80eb942 Fixed superfluous warning on pointer types comparing a non-void pointer to a void pointer. 2022-08-09 13:13:33 +08:00
Marco Aurelio da Costa
71a9ed04a2 Revert: Parse file included inside a macro at definition time
The reverted change broke too many use cases where users
where expecting the compiler quirky behavior to be the correct
behavior.

A better solution is needed for the quirk which does not break
current usage.
2022-08-07 11:24:47 -03:00
acqn
a3a5fbe809 Disallowed 'defined' as a macro name. 2022-08-07 13:56:47 +08:00
acqn
7971eec3cc Fixed parentheses handling when a function-like macro name itself is used as an macro argument. 2022-08-07 12:45:48 +08:00
acqn
ae811baaf1 Fixed the bug that redefined macros could co-exist but not all be undefined with a single #undef. 2022-08-06 18:21:42 +08:00
acqn
0a051a4dee Unsupported #pragma within argument lists of function-like macro invocation. 2022-08-06 16:56:28 +08:00
acqn
251e984ba8 Fixed error recovery with preprocessing directives failures. 2022-08-05 14:03:51 +08:00
Bob Andrews
2c742ffc1c
Merge pull request #1800 from acqn/PPFix
[cc65] Preprocessor fixes
2022-07-28 01:48:41 +02:00
acqn
f8d08b1e1a More post-C99 predefined macros. 2022-07-26 21:40:19 +08: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
acqn
80fc8cd11e Added preprocessor warning on missing terminating characters of character/string literals. 2022-07-26 21:10:36 +08:00
acqn
2c9c8ee196 Fixed extra "Macro argument count mismatch" message when a macro argument list is unterminated. 2022-07-26 21:10:31 +08:00
acqn
60c1290468 Fixed the bug that preprocessor could run past the end of included files.
Fixed the wrong filename and 0 line number in disgnostics when a preprocessor error occurred at the end of a file.
Fixed diagnostics for missing #endif.
2022-07-26 21:10:26 +08:00
acqn
8289c94e69 Fixed skipped lines consist of a leading # followed by any non-directive PP-token sequence. 2022-07-26 14:28:27 +08:00
acqn
0063f73f8a Fixed __FILE__ and __LINE__ macros for preprocessor. 2022-07-24 23:19:05 +08:00
acqn
7381a2c420 Added check for extra tokens at the end of directives.
Improved diagnostics on missing/illegal macro names.
2022-07-24 19:07:16 +08:00
acqn
be26b0631b Fixed #ifdef and #ifndef. 2022-07-24 19:07:02 +08:00
acqn
066a5e0fec Fixed #pragma charmap for string literals. 2022-07-24 16:38:41 +08:00
acqn
ac4cb258be Removed a mysterious "Hey!" message. 2022-07-21 11:59:38 +08:00
acqn
16a8a64746 Use a dedicated expression parser for the preprocessor. 2022-07-21 11:10:02 +08:00
acqn
f91c8ad247 Allowed comments right after "#" in preporcessor directives. 2022-07-21 11:09:59 +08:00
acqn
d3d6de2704 Allowed the pp-tokens following #error and #warning directives to be optional. 2022-07-21 11:09:56 +08:00