Rangi
daba94b495
Remove pointless std::move from non-move constructor
2026-07-03 13:12:29 -04:00
Rangi
2f604bfa9a
Fix error message when an rgbgfx output file cannot be created
2026-07-03 13:08:28 -04:00
Rangi
9bbb2247a7
Fix rgbasm -Werror=... not adding to the final error count
2026-07-03 13:05:33 -04:00
Rangi
9b4df11473
Describe how to patch external projects
2026-07-02 12:37:26 -04:00
Rangi
586c3073f9
Revert "Remove static compile flags"
...
This reverts commit e3fc46f933 .
We need compile_flags.txt to support clang-tidy
2026-06-30 11:16:14 -04:00
Rangi
3941a28661
Remove unused variables
2026-06-30 10:30:31 -04:00
Rangi
b252877b05
Comment why we use Ninja as the generator for CMake
2026-06-28 17:38:50 -04:00
Rangi
fc7d9ad573
Handle more numeric literal syntax errors in linker scripts
2026-06-09 18:46:51 -04:00
Rangi
0b91bf654b
Rename BaseV to ValidBaseV
2026-06-09 17:55:38 -04:00
Rangi
6b2b6e6000
Fix off-by-one error with INCLUDEd linker script line numbers
2026-06-09 16:16:21 -04:00
Rangi42
f72a4d53e2
Add -Wlarge-constant to RGBLINK as it is for RGBASM
2026-06-09 16:16:21 -04:00
Rangi
075f132d77
Use a smaller unordered_map just for looking up line-leading keywords
2026-05-27 22:01:20 -04:00
Rangi
31e1d2ec87
Do not build up a std::string when skipping leading keywords
2026-05-27 22:01:20 -04:00
Rangi
673c62414f
Use std::string_view keys for UpperMap
...
This avoids constructing temporary `std::string` objects on lookup
2026-05-27 22:01:20 -04:00
Rangi
007672f080
Intern identifier strings only after checking for keywords
2026-05-25 23:55:57 -04:00
Rangi
7eaca1577d
Update .gitattributes for test/asm/crlf.asm
...
A fresh clone showed a diff even without any bytes changed.
2026-05-25 22:57:52 -04:00
Rangi
996469ee28
Ensure CRLF line endings are preserved when necessary
...
Some test cases need CRLF line endings checked out even on Unix.
Also some source files had inadvertently contained CR bytes.
2026-05-25 22:00:45 -04:00
Rangi
ed19806434
Don't hard-code std::string as the key type for InsertionOrderedMap
2026-05-25 14:21:18 -04:00
Rangi
a0d96a0856
Factor out repeated expandedSymName logic
2026-05-25 14:21:18 -04:00
Rangi
4b992bfea5
Use the name of sym_GetPC() instead of hard-coding "@" again
2026-05-25 14:21:14 -04:00
Rangi
141a7fe22b
Add assume checks for expected Token types, like RPNValue has for RPNCommands
2026-05-25 14:14:34 -04:00
Rangi
43ffc89bb4
Correct comment SIZE_MAX to UINT16_MAX
2026-05-25 13:55:12 -04:00
Rangi
72a410c007
Encapsulate charmap_Init, like sym_Init
2026-05-25 13:54:26 -04:00
Rangi
090768e2c9
Some Expansion references can be const
2026-05-23 13:06:09 -04:00
Rangi42
5f2ee530b8
Pass -Wno-unused-but-set-variable by default, not just in make develop
...
The Bison-generated parser skeleton otherwise triggers this warning
with Apple clang++ for `yynerrs_`.
2026-05-23 01:40:13 -04:00
Rangi
ef2f021892
Simplify sectError handling, without the need for an empty-string sentinel
...
The `errorNoTrace` case for the empty-string sentinel was unreachable,
so we can just have a `fatalNoTrace` error right away.
2026-05-22 18:17:25 -04:00
Rangi
728d14879b
Consistently use -std=c++2a, not -std=c++20
...
Commit 63a911e657 switched
to `-std=c++20` since at the time we required GCC 10 or higher.
Commit d5ce5329ea partially reverted
to `-std=c++2a` since we once again support GCC 9, which did not
yet handle `std=c++20`.
2026-05-20 17:09:23 -04:00
Rangi
42e3da837c
Comment the commands to use for profiling and code coverage
2026-05-09 20:52:45 -04:00
Rangi42
f0161b41c8
Update readHexNumber for consistency with other routines
2026-04-29 12:31:00 +02:00
Rangi42
ca23210f18
Refactor and rename some numeric literal lexing for asm and linkerscript consistency
2026-04-29 12:15:14 +02:00
Rangi42
85e044f5be
Use std::move when relevant in Token constructor
2026-04-28 13:32:45 +02:00
Rangi42
60e76b2da4
Avoid UB if new OOMs by removing std:nothrow
2026-04-28 13:28:32 +02:00
Rangi42
3c7488c131
Some refactoring, renaming, and debug assertions for clarity and safety
...
- Add more `assume()` checks in the lexer
- Replace double negative "`disable* = false`" with "`enable* = true`"
- Naming convention of "`std::deque<> *Stack`" when relying on
`.push_front()` and `.pop_back()`
2026-04-27 18:47:06 +02:00
Rangi42
9fd0c0297f
Fix invalid character in bracketed macro argument
...
The invalid character should not be consumed by `shiftChar()`.
2026-04-27 17:11:20 +02:00
Rangi42
c1c7e64249
Add two assume calls to verify lexer arguments
2026-04-27 15:35:10 +02:00
Rangi42
a18b2f1049
Consistently lex local labels after keywords, even when skipping/capturing
2026-04-27 15:28:30 +02:00
Rangi42
3f144b7713
Add test case for local labels after block-ending keywords
2026-04-27 15:04:12 +02:00
Rangi42
eeb3a73210
Small optimization to skipToLeadingKeyword
2026-04-27 14:26:47 +02:00
Rangi42
0553491107
Replace a FIXME comment with an explanation of why we can't/won't "fix" it
2026-04-20 14:51:38 +02:00
Rangi42
12186fdccc
Keep more non-declaration initialization within the for loop clause
2026-04-19 22:01:56 +02:00
Rangi
71dfab3365
Use charmapEntry to simplify charmap_HasChar
2026-04-17 15:39:30 -04:00
Rangi
20b11039c9
Keep trie edges sorted for O(log N) lookup
2026-04-17 15:39:30 -04:00
Rangi
eb9e9c0f33
Replace charmaps' fixed-size 256-value array with a vector of pairs
...
This should save memory at the cost of O(n) instead of O(1) access,
which should be okay because the `next` vector is generally small.
2026-04-17 15:39:30 -04:00
Rangi
ac2a022124
Set the Cygwin shell once as a default for its job
2026-04-15 23:54:12 -04:00
Rangi
1249c4ef58
Revert "Set up Cygwin before cloning our repo"
...
This reverts commit aeedfb35a6 .
2026-04-15 21:53:29 -04:00
Rangi
b3c3981a90
Use a separate CI step to install clang-format before running it
...
Also use short `-Yqu` flags like our other invocations
2026-04-15 20:12:48 -04:00
Rangi
73941c3249
Add .git-blame-ignore-revs as a blame.ignoreRevsFile
2026-04-13 13:26:29 -04:00
Rangi42
7596ae67b5
Fix internal link to docs/CONTRIBUTING.md
2026-04-13 02:34:46 -04:00
Rangi
fc08ab6aee
Print a GitHub Actions error annotation if install_deps.sh fails
...
See https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-commands#setting-an-error-message
2026-04-13 02:04:56 -04:00
Rangi
c7663423d6
Update our Dockerfile to base on Debian 13 slim
2026-04-12 22:36:41 -04:00
Rangi
1ff73cd5e0
Revert "Stop trying to explicitly install pkg-config in CI ( #1940 )"
...
This reverts commit bc3572ec37 .
Turns out that our Dockerfile *does* need to install `pkg-config`
on the `debian:12-slim` image.
2026-04-12 22:33:25 -04:00
Rangi
49a4da2235
Revert "Generate Bison output in CMake build tree"
...
This reverts commit 4577ff16bc .
2026-04-10 17:18:40 -04:00
Rangi
2cfb2b2533
Remove the claim that only exported symbols appear in sym and map files
...
Fixes #1916
This claim was true in v0.4.2, but intentionally changed in v0.5.0.
rgblink(1) already explains that "all visible labels and exported numeric constants"
will appear, which is a more appropriate location than rgbasm(5).
2026-04-09 21:28:07 -04:00
Rangi
187e1a55b8
Add examples for using character literals instead of strings as numbers
...
Fixes #1890
2026-04-08 21:42:10 -04:00
Rangi
6e13779b8b
Use C++-sryle static_cast, not C-style explicit cast
...
`uint32_t(param)` is actually functional notation of explicit casting,
not a direct constructor call. `uint32_t{param}` would be uniform
initialization syntax for a constructor call, but would not allow
narrowing from `uint64_t`. See issue #1904 for discussion.
2026-04-08 20:05:36 -04:00
Rangi
25bf0e9e2c
SOURCE_DATE_EPOCH must be in base 10
2026-03-30 21:31:37 -04:00
Rangi
4ce4162da4
A little .yml cleanup
2026-03-30 20:29:06 -04:00
Rangi
18b074711e
Fix rgbasm -s not overriding a previous -s
2026-03-30 20:18:19 -04:00
Rangi
efd4373a56
Check for a SDAS "Def" or "Ref" line before reading a subsequent integer
...
Without checking `token[0]` through `token[2], `readInt` starting at
`&token[3]` could go out of bounds on a badly-formed SDAS .rel object file
2026-03-30 19:45:44 -04:00
Rangi
92a31ff7df
Correct list numbering
2026-03-30 19:23:42 -04:00
Rangi42
919a5dba89
Correct CONTRIBUTING.md to accurately describe test/fetch-test-deps.sh
2026-03-23 11:13:23 -04:00
Rangi
65b0b49720
Update zlib to 1.3.2
...
Note that the DLL name created by CMake with `BUILD_SHARED_LIBS`
has changed from `zlib1.dll` to `z.dll`. This was caused by the
"Continued rewrite of CMake build [Vollstrecker]" from its
changelog <https://zlib.net/ChangeLog.txt >, and has been reported
in <https://github.com/madler/zlib/issues/1181 >.
The MinGW package `libz-mingw-w64-dev` still calls it `libz1.dll`.
2026-03-06 22:28:09 -05:00
Rangi
48d58ba095
Pass -Wdangling-alias to Bison 3.5 or newer
...
`bison -Wall` enables all diagnostics except `-Wcounterexamples`
(added in 3.7; we already pass it), `-Wyacc` (which we do not need),
and `-Wdangling-alias` (added in 3.5).
2026-03-06 22:28:09 -05:00
Rangi
af0505b4cd
Explicitly clarify that SECTION(@) returns the name of the current section
2026-02-06 19:37:49 -05:00
Rangi
d053025070
Avoid writing "XXX" since it's a conventional "TODO/FIXME" comment
2026-01-22 13:01:10 -05:00
Rangi
ade898d815
List -B in rgbgfx options
2026-01-13 09:46:33 -05:00
Rangi
e738b90c69
Refactor to combine similar functions into one
2026-01-07 16:36:04 -05:00
Rangi
a91d26192d
Fix SECTION UNION alignment depending on piece order
2026-01-07 16:36:04 -05:00
Rangi
92bfe5d930
Release v1.0.1
2026-01-01 00:43:43 -05:00
Rangi
9b22ff3491
Fix link in man page
2025-12-12 18:25:47 -05:00
Rangi
a4af81f250
Fix two "Using a macro as first argument cancels effect of .Li" man page warnings
...
These were observed in https://udd.debian.org/lintian/?packages=rgbds
and can be reproduced by running:
for f in man/*; do
echo $f
LC_ALL=C.UTF-8 MANROFFSEQ='' MANWIDTH=120 \
man --warnings -E UTF-8 -l -Tutf8 -Z "$f" >/dev/null
done
2025-12-12 12:31:03 -05:00
Rangi
d4e0ca5f90
Update libpng to 1.6.53
2025-12-11 11:48:18 -05:00
Rangi42
27dca5680c
Fix formatting typo in man/rgbasm-old.5
2025-12-09 10:33:24 -05:00
Rangi
c8161be23a
Add missing SPDX-License-Identifier: MIT comments
2025-12-05 22:41:12 -05:00
Rangi
2c5c453ab8
Refactor FileStackNode::printBacktrace from recursive to iterative
...
This avoids a potential stack overflow for very long backtraces,
or for corrupt object files with cyclic backtraces
2025-12-05 22:41:12 -05:00
Rangi
c3e245c13e
Correct typo in rgbds(5)
2025-12-05 22:39:30 -05:00
Rangi
1c00123b33
Add missing return 0; to rgblink main()
2025-12-04 21:06:46 -05:00
Rangi
8d6c617875
Use 4 spaces per tab in LCOV coverage report
2025-12-04 17:56:16 -05:00
Rangi42
752e2b3620
Symbol names with more than two '.'s could be defined as constants
...
Dot-only names could also trip an assertion in `make develop`
when used as labels
2025-12-04 15:15:41 -05:00
Rangi42
ad3188f038
Fix garbage characters at EOF causing an infinite loop
2025-12-04 15:15:41 -05:00
Rangi
1eb4eb3339
Reuse the usage.name for printing version info
2025-11-18 22:32:45 -05:00
Rangi
a3d3e1525a
Fix RGBLINK object type detection
2025-11-18 22:01:43 -05:00
Rangi
3553c9c4da
Fix RGBLINK evaluation of undefined RPN symbols
...
This was the only RPN case to not assign a deliberate value
in all possible branches.
Fixes #1858
2025-11-18 16:40:24 -05:00
Rangi
5c2c893ced
Refactor getSectionDescription in src/link/assign.cpp
2025-11-16 17:37:01 -05:00
Rangi
04e3a904c2
Avoid calling style_Set/Reset before strerror(errno),
...
since they may call `isatty` which can change `errno`
Fixes #1857
2025-11-08 12:06:16 -05:00
Rangi
395b03e88e
Disallow SECTION UNION for ROM sections
...
Fixes #1855
2025-11-07 11:38:06 -05:00
Rangi42
fb9fa6038c
Release version 1.0.0
2025-10-31 20:19:24 -04:00
Rangi42
558d3ca0fc
Disallow labels before ENDC
2025-10-31 18:21:59 -04:00
Rangi42
df5162edca
Use loops instead of tail calls and musttail
...
gcc 15.2.1 20250813 complains "address of automatic variable can
escape to `musttail` call" from `-Wmaybe-musttail-local-addr`,
and guaranteeing tail-call optimization cross-platform is more
trouble than it's worth.
2025-10-27 12:05:27 -04:00
Rangi42
2519d1e698
Mention REDEF and FOR regarding EQUS expansion
...
Fixes #1851
2025-10-27 10:54:16 -04:00
Rangi42
ca383c91ca
Revert "More accurate 8-bit <=> 5-bit RGB color conversion ( #1827 )"
...
This reverts commit 223b3d1921 .
2025-10-24 13:32:59 -04:00
Rangi
8bedd710d7
Simplify musl's getopt, including removing optind, optopt, opterr, idx, and longonly
2025-10-23 13:39:28 -04:00
Rangi
efb5a88edb
Show conventional colored "error:"/"FATAL:" for CLI option errors
2025-10-23 12:40:29 -04:00
Rangi
a0bb830679
More consistent man page descriptions for CLI options
2025-10-22 14:48:24 -04:00
Rangi
7654c6e27a
More consistent man page descriptions for warning diagnostics
2025-10-22 14:03:34 -04:00
Rangi
400375b2e5
Share some handling between two tests of rgbasm -M -
2025-10-20 20:57:48 -04:00
Rangi
1badba03d8
Clean up some #define callables
...
These are used where anonymous functions would not be sufficient
2025-10-13 13:14:49 -04:00
Rangi42
64bcef99bd
Lower default -Wtrunction= level to 1
2025-10-13 11:48:33 -04:00
Rangi42
aa672bbec9
Rephrase PURGE documentation and raise the default level to 2
...
Fixes #1847
2025-10-13 11:43:29 -04:00
Rangi42
651877e094
Avoid reusing a static local variable (too fragile)
2025-10-08 21:19:23 -04:00