Commit Graph

20 Commits

Author SHA1 Message Date
Rangi
56071599e7 Allow trailing commas in bare lists
This applies to macro arguments, DB, DW, DL, DS,
PRINT, PRINTLN, EXPORT, PURGE, and OPT.

It also removes support for empty entries in DB/DW/DL.
(Deprecating it would require keeping parser support,
which is ambiguous with trailing commas.)

Fixes #753
2021-03-02 11:48:20 +01:00
Rangi
1dafc1c762 Allow empty macro arguments, with a warning
Fixes #739
2021-02-28 10:38:49 -08:00
Rangi
cb61da8842 -Wmacro-shift warns about shifting macro arguments too far (#741)
Fixes #735
2021-02-16 16:31:01 -05:00
Rangi
fb39c3a70e Consistently refer to "directives", not "pseudo-ops"
Some docs and warnings already referred to SECTION and
db/dw/dl "directives", but others used "pseudo-ops".
2021-01-19 15:03:22 +01:00
Rangi
77279984a5 Implement STRRPL
Fixes #660

STRRPL(str, "", new) does nothing
(warn about it with -Wempty-strrpl)
2021-01-04 00:20:35 +01:00
Rangi
c0ce1da4c3 Implement STRFMT and more printf-like format specifiers for string interpolation (#646)
Fixes #570
Fixes #178

Use errors for inapplicable format spec flags instead of -Wstring-format
2020-12-29 22:53:15 +01:00
ISSOtm
0c55703438 Improve helpers.h
Use C11 standard _Noreturn instead of attributes (except, of course, MSVC)
Remove unused helpers
Avoid trapping in release builds, in favor of just unreachability
Improve shim when __builtin_* are not available
2020-10-26 15:19:31 +01:00
anderoonies
55be77be69 discard block comments delimited with /* */ 2020-10-15 12:42:53 -04:00
ISSOtm
4cfed3c98f Rewrite charmap system
Avoid allocating a *ton* of data per charmap
Stop relying on uninitialized data in charmap nodes
Only initialize charmap nodes lazily
2020-10-04 04:31:10 +02:00
ISSOtm
a1286e6f0e Make newlines explicit in error messages
In preparation for a change a PR is about to make
2020-09-27 10:54:06 +02:00
Antonio Niño Díaz
daf780c7e6 Refactor warning array for clarity 2020-08-04 22:28:56 +01:00
James Larrowe
bdf397bba7 Add empty data directive warning
Fixes #516
2020-05-06 09:50:28 -04:00
ISSOtm
cb0a882a31 Order warnings alphabetically 2020-03-23 16:03:36 +01:00
ISSOtm
fb58166e5d Add assertions
Closes #292
2020-03-21 23:00:38 +01:00
ISSOtm
61897d8b52 Fix warning.h not including a required header 2020-03-14 11:33:51 +01:00
ISSOtm
28473d314a Make implicit truncation a warning 2020-02-05 13:20:51 +01:00
ISSOtm
b11d121c48 Remove undefined behavior from shifts
`asl` and `asr` in `src/link/patch.c` courtesy of @pinobatch, and rearranged in RGBASM
evaluators.
2020-01-28 12:37:38 +01:00
ISSOtm
4fe44447a2 Add license headers where missing 2020-01-19 11:11:36 +01:00
ISSOtm
f710f21ad8 Reorder warnings alphabetically 2019-12-06 12:06:21 +01:00
ISSOtm
191ee4ba1f Add support for toggleable warnings 2019-11-18 20:45:21 +01:00