Sylvie
6a65cbc9ed
Some refactoring and reformatting ( #1431 )
2024-07-26 11:51:27 -04:00
Sylvie
352551d4f8
Allow padding to coexist with overlay file ( #1395 )
2024-05-17 11:14:44 +02:00
Rangi42
b8387427a6
Use consistent RGBDS_<PROG>_<NAME>_HPP header guard convention
2024-04-14 21:50:05 -04:00
ISSOtm
e5078aba3b
Clean up #includes
...
Remove unused headers, and avoid relying on transitive inclusions
`include-what-you-use` has been very useful for this!
2024-03-28 01:25:38 +01:00
ISSOtm
cae7b5dcf6
Use standard attribute syntax instead of IBM __attribute__
...
Move format attrs to proper standard location
For some reason, GCC 13 is more lax than earlier versions...
2024-03-27 20:01:12 -04:00
Rangi42
506911d7d0
Refactor to avoid redundant obj_CheckAssertions function
2024-03-27 16:19:01 -04:00
Rangi42
846a9411b9
Refactor FileStackNode::dump to not need a helper function
2024-03-10 14:14:34 -04:00
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
Rangi42
bd88787cb3
Use FileStackNode constructor to avoid std::monostate possibility
2024-03-05 14:22:29 -05:00
Sylvie
e74073e480
Run clang-format on everything ( #1332 )
2024-03-04 14:22:49 -05:00
Rangi42
f2c875e71e
Avoid using std::get except in holds_alternative-asserting accessors
2024-03-03 23:33:23 -05:00
Sylvie
447c561aaa
Use std::variant for symbol values ( #1330 )
2024-03-03 21:16:36 -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
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
17df94c75b
Remove now-unnecessary cleanup functions
2024-02-29 13:44:08 -05:00
Rangi42
96f354026a
Use automatic allocation for section data
2024-02-29 13:44:08 -05:00
Rangi42
002eed405b
Use automatic allocation for assertion error messages
2024-02-29 13:44:08 -05:00
Rangi42
ef1c1440a0
Use automatic allocation for symbol names
2024-02-29 13:44:08 -05:00
Rangi42
826512730c
Use automatic allocation for section symbols
2024-02-29 13:44:08 -05:00
Rangi42
5a26a48d11
Use automatic allocation for section names
2024-02-29 13:44:08 -05:00
Rangi42
3c0af94c5c
Use automatic allocation for patches
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
52ac98c294
Use std::vector for section data
2024-02-29 13:44:08 -05:00
Rangi42
4cd88ade54
Use automatic allocation for object file symbols
2024-02-29 13:44:08 -05:00
Rangi42
dead69eb2c
Use std::vector for section symbols
2024-02-29 13:44:08 -05:00
Rangi42
f47ce337bf
Use std::vector for reading object file symbols
2024-02-29 13:44:08 -05:00
Rangi42
5075ac8887
Use std::vector for RPN expressions
2024-02-29 13:44:08 -05:00
Rangi42
d792ee4b61
Use std::vector for section patches
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
26a93a530b
Use std::deque for assertions
...
Also fix a memory leak
2024-02-29 13:44:08 -05:00
Rangi42
f44701c02d
Use std::map for rgblink symbols and sections
2024-02-29 13:44:08 -05:00
Sylvie
595c066c2a
Remove #include <stdbool.h> ( #1317 )
2024-02-24 10:51:46 -05:00
Sylvie
c0d534f5ad
No more flexible array members (not standard C++) ( #1307 )
...
* Replace FAMs with `std::vector`s (or one `std::string`) in four `struct`s
* Anonymous types declared in an anonymous union are also non-standard
Only Clang complains about this (-Wnested-anon-types)
2024-02-22 16:22:37 -05:00
Rangi42
bba5b8a740
Remove unused struct definition
2024-02-21 16:42:14 -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
Rangi42
cd297e1f90
Remove unused rgblink function sym_ForEach
2024-02-18 18:46:07 -05: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
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
1e70e703a7
Build everything as C++ ( #1176 )
2023-11-07 21:45:56 +01:00
Rangi42
7a1e052b58
Factor out one shared enum FileStackNodeType
2023-11-07 08:27:03 +01:00
Rangi42
02f9128d07
Make some changes noticed while porting to C++
2023-11-07 08:27:03 +01:00