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

Mesons checks can fail with certain strict compiler settings due to missing newlines at EOF #13684

Open
mjgarton opened this issue Sep 16, 2024 · 0 comments · May be fixed by #13685
Open

Mesons checks can fail with certain strict compiler settings due to missing newlines at EOF #13684

mjgarton opened this issue Sep 16, 2024 · 0 comments · May be fixed by #13685

Comments

@mjgarton
Copy link

Describe the bug
When using settings certain C compiler settings, test programs meson attempts to compile can fail due to missing newlines at EOF

To Reproduce
Example meson.build:

project('myproject', 'c')
executable('myexecutable', 'main.c')
cc = meson.get_compiler('c')
sizeof_int = cc.sizeof('int') 

Run meson with strict compiler settings:
CC=clang CFLAGS="--std=c99 --pedantic-errors" meson setup build --wipe

sizeof_int will be -1 in this case, because a compile of a test program failed due to missing newline.

Expected behavior
Meson test programs compile as expected.

system parameters
Fedora Linux 40
Python 3.12.6
meson 1.4.1
ninja 1.12.1

@mjgarton mjgarton linked a pull request Sep 16, 2024 that will close this issue
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 a pull request may close this issue.

1 participant