Skip to content

Commit

Permalink
GCC12: Convert array comparisons to pointer-to-first-element comparis…
Browse files Browse the repository at this point in the history
…ons.

These are equivalent, but the former is deprecated in C++20 and warned by GCC12.
Refs #60
  • Loading branch information
keirf committed Feb 11, 2025
1 parent 37b797f commit 3243030
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ int main(void)
watchdog_init();

/* Relocate DATA. Initialise BSS. */
if (_sdat != _ldat)
if (&_sdat[0] != &_ldat[0])
memcpy(_sdat, _ldat, _edat-_sdat);
memset(_sbss, 0, _ebss-_sbss);

Expand Down

0 comments on commit 3243030

Please sign in to comment.