mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
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...
This commit is contained in:
@@ -47,7 +47,7 @@ std::optional<std::string> currentLoadScope = std::nullopt;
|
||||
int32_t loadOffset; // Offset into the LOAD section's parent (see sect_GetOutputOffset)
|
||||
|
||||
// A quick check to see if we have an initialized section
|
||||
attr_(warn_unused_result) static bool checksection() {
|
||||
[[nodiscard]] static bool checksection() {
|
||||
if (currentSection)
|
||||
return true;
|
||||
|
||||
@@ -57,7 +57,7 @@ attr_(warn_unused_result) static bool checksection() {
|
||||
|
||||
// A quick check to see if we have an initialized section that can contain
|
||||
// this much initialized data
|
||||
attr_(warn_unused_result) static bool checkcodesection() {
|
||||
[[nodiscard]] static bool checkcodesection() {
|
||||
if (!checksection())
|
||||
return false;
|
||||
|
||||
@@ -71,7 +71,7 @@ attr_(warn_unused_result) static bool checkcodesection() {
|
||||
return false;
|
||||
}
|
||||
|
||||
attr_(warn_unused_result) static bool checkSectionSize(Section const §, uint32_t size) {
|
||||
[[nodiscard]] static bool checkSectionSize(Section const §, uint32_t size) {
|
||||
uint32_t maxSize = sectionTypeInfo[sect.type].size;
|
||||
|
||||
// If the new size is reasonable, keep going
|
||||
@@ -88,7 +88,7 @@ attr_(warn_unused_result) static bool checkSectionSize(Section const §, uint
|
||||
}
|
||||
|
||||
// Check if the section has grown too much.
|
||||
attr_(warn_unused_result) static bool reserveSpace(uint32_t delta_size) {
|
||||
[[nodiscard]] static bool reserveSpace(uint32_t delta_size) {
|
||||
// This check is here to trap broken code that generates sections that are too big and to
|
||||
// prevent the assembler from generating huge object files or trying to allocate too much
|
||||
// memory.
|
||||
|
||||
Reference in New Issue
Block a user