Sylvie
17444e825a
Reduce the header declarations ( #1342 )
...
- Since we have style rules to include foo.hpp at the top of its
corresponding foo.cpp, this takes any headers included by foo.hpp
as being also guaranteed for foo.cpp.
- Use C-style <foo.h> instead of <cfoo>, since the latter only
guarantees putting symbols in the `std` namespace, which we are
not using for C functions (e.g. `printf` not `std::printf`).
- Remove now-unused `__PRETTY_FUNCTION__` reporting
2024-03-09 14:55:39 -05:00
Sylvie
4a7d333891
Use std::unique_ptr for rgblink sections ( #1337 )
2024-03-09 11:12:01 -05:00
Sylvie
53537cf9af
Remove now-unnecessary enum keyword ( #1338 )
...
C++ does not need it
2024-03-08 19:40:41 -05:00
Sylvie
e74073e480
Run clang-format on everything ( #1332 )
2024-03-04 14:22:49 -05:00
Rangi42
930a5c3e44
Replace RGBLINK non-null pointers with references
2024-03-03 00:57:03 -05:00
Rangi42
52f8ecc347
We do not call malloc/free any more
2024-03-02 08:16:44 -05:00
Sylvie
446fb07fd5
Use std::deque<std::vector> for free space ( #1323 )
2024-03-01 16:21:29 -05:00
Sylvie
1ac3c0262f
Refactor structs to use methods instead of functions ( #1322 )
2024-03-01 13:11:45 -05:00
Rangi42
e14ba664ea
Remove redundant (void) parameter declarations
2024-03-01 10:41:47 -05:00
Sylvie
043db49676
Replace NULL with nullptr ( #1321 )
2024-02-29 15:06:33 -05:00
Sylvie
eff8c324c8
Remove now-unnecessary struct keyword ( #1320 )
...
C++ acts like structs are `typedef`ed by default
We do have to keep `struct stat`, since there's ambiguity
with the function also called `stat`.
2024-02-29 14:41:58 -05:00
Rangi42
e90084ad06
Rename isWRA0Mode to isWRAM0Mode
2024-02-29 13:44:08 -05:00
Rangi42
0cc49782ab
Use std::variant and automatic allocation for file stack node data
2024-02-29 13:44:08 -05:00
Rangi42
48b2e94aa3
Use std::string for symbol/section/node names and assertion messages
2024-02-29 13:44:08 -05:00
Rangi42
b207bff157
Use std::vector for fstack REPT nodes
2024-02-29 13:44:08 -05:00
Rangi42
d5de3fa111
Use std::deque for symbol lists
...
Also fix a memory leak that this reveals
2024-02-29 13:44:08 -05:00
Rangi42
d87b1ed22a
Refactor some redundant error/warning-printing code
2024-02-24 19:05:29 -05:00
Sylvie
595c066c2a
Remove #include <stdbool.h> ( #1317 )
2024-02-24 10:51:46 -05:00
Sylvie
54d6a22d19
Build with pedantically standard C++ ( #1309 )
...
* Remove array designators (not standard C++)
* Build with pedantically standard C++
2024-02-23 16:46:53 -05:00
Rangi42
ee59f17ea1
Free all the charmaps after parsing
2024-02-19 09:00:15 -05:00
Sylvie
9cdd0b8a02
No more anonymous structs (not standard C++) ( #1305 )
...
This is one step to restoring `-pedantic` builds
2024-02-19 08:12:20 +01:00
Sylvie
8a49a0b714
Report "<stdin>" or "<stdout>" when using "-" as a filename placeholder ( #1297 )
...
Also fix a memory leak with `targetFileNames`
2024-02-18 17:07:25 +01:00
Sylvie
d71a161bc9
Phrase error messages as "Failed to", not "Could not" or "Couldn't" ( #1298 )
2024-02-18 14:52:31 +01:00
Rangi
5a3a215b0e
Don't delete script.cpp after building ( #1272 )
...
Ensure consistency in linker script parser interface
Make the declaration and definition visible when compiling
so that the compiler can warn about inconsistencies.
Co-authored-by: ISSOtm <me@eldred.fr >
2023-12-17 11:42:07 -05:00
Eldred Habert
fd78a9ae83
Port linkerscript parser to Bison ( #1266 )
...
Notable side effects:
* Use the standard-conformant MSVC preproc
* Add test for linker script INCLUDE
* Improve wording of placement conflict errors
* Fix errors from not newline-terminated files
* Teach checkdiff about the linker script doc
* Call linker script "commands" "directives" instead
---------
Co-authored-by: Rangi42 <remy.oukaour+rangi42@gmail.com >
2023-12-11 02:29:37 +01:00
Rangi
1402615bc0
Refactor how Makefile invokes Bison for reusability ( #1259 )
...
Co-authored-by: Eldred Habert <eldredhabert0@gmail.com >
2023-12-01 13:29:05 -05:00
Rangi
6132b77c1e
Add more tests for RGBASM code coverage ( #1257 )
...
* Add more tests for RGBASM code coverage
* Use C++ unnamed parameters, not `(void)` casting
* Fix crash in `sect_AlignPC` from #1253
2023-12-01 10:21:43 -05:00
Rangi
e824e34526
Use an iterator template for enum sequence loops ( #1228 )
2023-11-12 09:19:19 +01:00
Rangi
31529524c8
Use some more C++20 features ( #1231 )
2023-11-11 20:47:53 -05:00
Rangi
1e70e703a7
Build everything as C++ ( #1176 )
2023-11-07 21:45:56 +01:00