Skip to content

Gcc16 ext2fs - #3

Open
mitchellwaite wants to merge 2 commits into
Free60Project:masterfrom
mitchellwaite:gcc16_ext2fs
Open

Gcc16 ext2fs#3
mitchellwaite wants to merge 2 commits into
Free60Project:masterfrom
mitchellwaite:gcc16_ext2fs

Conversation

@mitchellwaite

Copy link
Copy Markdown

These changes make the ext2fs library compile properly against GCC16, and should also be compatible with GCC 9.2.0 until such a time as libxenon is updated.

  • Implicit function definitions are errors by default in the new GCC, this trips up mkjournal:
mkjournal.c:64:33: error: implicit declaration of function 'htonl' [-Wimplicit-function-declaration]
   64 |         jsb->s_header.h_magic = htonl(JFS_MAGIC_NUMBER);
      |                                 ^~~~~
  • default C standard in GCC16 doesn't allow "typedef int bool;", so the makefile enables the GNU11 standard that was default with the older compiler
/mnt/d/Documents/GitHub/libext2fs/source/tdb.c:107:13: error: 'bool' cannot be defined via 'typedef'
  107 | typedef int bool;
      |             ^~~~
/mnt/d/Documents/GitHub/libext2fs/source/tdb.c:107:13: note: 'bool' is a keyword with '-std=c23' onwards

- Implicit function definitions are errors by default in the new GCC
- default C standard in GCC16 doesn't allow "typedef int bool;"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant