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
Sylvie
a68bebf4a2
Use a Defer struct to close files and restore lexer state with RAII ( #1379 )
2024-03-27 10:42:53 -04:00
Sylvie
0300971a17
Fix some header #includes with clangd LSP ( #1370 )
...
Co-authored-by: ISSOtm <eldredhabert0@gmail.com >
2024-03-21 15:13:10 -04:00
Rangi42
05d79d87f6
Pass std::string references to RPN functions
2024-03-18 14:42:05 -04:00
Rangi42
e96675be03
Pass std::string references to fstack functions
2024-03-18 14:42:05 -04:00
Rangi42
7b11c528ef
Pass std::string references to section functions
2024-03-18 14:42:05 -04:00
Sylvie
eb99fc8681
Use a std::unordered_map for looking up sections by name ( #1357 )
2024-03-13 19:45:52 -04:00
Rangi42
569b940b82
No need to manually do the Expression destructor's job
2024-03-09 19:33:53 -05: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
53537cf9af
Remove now-unnecessary enum keyword ( #1338 )
...
C++ does not need it
2024-03-08 19:40:41 -05:00
Rangi42
75cc12bb3d
Use std::optional for fstack paths
2024-03-07 21:41:02 -05:00
Rangi42
097b7c3baf
Use std::string for symbol names
2024-03-07 12:40:33 -05:00
Rangi42
bf45ebb178
Run clang-format to fix some inconsistent style
2024-03-07 11:52:53 -05:00
Rangi42
e5b7e65e91
Use std::nothrow from <new> with every new allocation
2024-03-07 09:56:15 -05:00
Rangi42
585c620945
Rename fail to sectError, since it increments nbSectErrors
2024-03-05 14:36:18 -05:00
Sylvie
e74073e480
Run clang-format on everything ( #1332 )
2024-03-04 14:22:49 -05:00
Rangi42
277ea9be28
Replace RGBASM non-null pointers with references
2024-03-03 00:57:03 -05:00
Rangi42
ba00cf5684
Use std::string for section names
2024-03-02 04:47:02 -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
18d4a81954
Use move semantics for the union stacks
2024-02-29 13:44:08 -05:00
Rangi42
843f3394c8
Use automatic allocation for DS args
2024-02-29 13:44:08 -05:00
Rangi42
dec1811d20
Use automatic allocation for section data
2024-02-29 13:44:08 -05:00
Rangi42
72e9f55368
Use automatic allocation for patches
2024-02-29 13:44:08 -05:00
Rangi42
9140180c85
Use automatic allocation for sections
2024-02-29 13:44:08 -05:00
Rangi42
bc8cb754c0
Use std::deque for sections
2024-02-29 13:44:08 -05:00
Rangi42
2ea6de7195
Use std::stack for unions
2024-02-29 13:44:08 -05:00
Rangi42
8083ef605f
Use std::deque for section patches
2024-02-29 13:44:08 -05:00
Rangi42
a310b659cd
Use std::deque (iterable) for section stack
2024-02-29 13:44:08 -05:00
Sylvie
595c066c2a
Remove #include <stdbool.h> ( #1317 )
2024-02-24 10:51:46 -05:00
Sylvie
6d29d2a67e
Simplify fstk_FindFile usage ( #1310 )
...
* Simplify `fstk_FindFile` usage
* Use `std::string` for `fstk_FindFile`
2024-02-22 13:14:38 +01:00
ISSOtm
1b08a12b26
Ensure that mid-section align 16 makes PC constant
...
This makes `align 16` a sort of `org`, which is *very* useful :)
2024-02-18 17:53:56 -05:00
ISSOtm
36dad4380e
Honor alignment offset for ALIGN[16, N]
...
The *one* place where it was missed...
2024-02-18 17:53:56 -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
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
cee3d1c859
Add more test coverage for RGBASM ( #1256 )
...
This also fixes two bugs: `-1 >>> 32` was -1 not 0, and `macro_FreeArgs` should have been called but wasn't.
2023-11-29 15:16:05 -05:00
Rangi
46e29de66f
Implement ds align[alignment, offset] ( #1181 )
2023-11-21 23:57:47 +01:00
Rangi
1e70e703a7
Build everything as C++ ( #1176 )
2023-11-07 21:45:56 +01:00