Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C23 dialect support #2414

Merged
merged 1 commit into from
Jan 16, 2025
Merged

Conversation

nickclark2016
Copy link
Member

@nickclark2016 nickclark2016 commented Jan 11, 2025

What does this PR do?

Adds support for the C23 and GNU23 dialects of C.

How does this PR change Premake's behavior?

No breaking changes. Purely an extension of the existing behaviors.

Anything else we should know?

With MSVC tooling, uses the clatest flag instead of C23, as the flag does not exist at time of PR. Closes #2410.

Did you check all the boxes?

  • Focus on a single fix or feature; remove any unrelated formatting or code changes
  • Add unit tests showing fix or feature works; all tests pass
  • Mention any related issues (put closes #XXXX in comment to auto-close issue when PR is merged)
  • Follow our coding conventions
  • Minimize the number of commits
  • Align documentation to your changes

You can now support Premake on our OpenCollective. Your contributions help us spend more time responding to requests like these!

@nickclark2016 nickclark2016 requested a review from a team January 11, 2025 18:21
@samsinsane samsinsane merged commit 07896b9 into premake:master Jan 16, 2025
49 checks passed
@stu
Copy link

stu commented Jan 20, 2025

I was gonna say, AWESOME! but this breaks something.

I did a checkout from the C23 merge commit and build off bootstrap

git checkout 07896b90314f63724fffc2956987f84019b573ad
git reset --hard && git clean -f -d -x
bash ./Bootstrap.sh
make -j8

ok we now have a premake5, lets rebuild itself.

./bin/release/premake5 embed
./bin/release/premake5 gmake2
Error: [string "src/base/_foundation.lua"]:179: bad argument #1 to 'format' (string expected, got nil)

(every premake5.lua i run this build against yields the above _foundation error, not just premake5's own build script)

checking against the commit before this one (216807e) yields no problems.

@nickclark2016
Copy link
Member Author

Looks like I messed something up in the gmake2 migration to gmake. That said, please try using the latest master and the gmake exporter (the old gmake has been renamed in preparation for removal).

@stu
Copy link

stu commented Jan 20, 2025

oooh old habits die hard. didnt realise gmake2 was supersceded by gmake and old gmake was gone!

using just gmake seems to work fine.

@nickclark2016
Copy link
Member Author

Awesome. Hopefully when 2422 gets merged in, the automatic "you should update scripts" message should actually work.

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.

cdialect option does not support c23
4 participants