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

Fix errors for gcc 14 #8553

Merged
merged 3 commits into from
Jun 14, 2024
Merged

Fix errors for gcc 14 #8553

merged 3 commits into from
Jun 14, 2024

Conversation

joaohf
Copy link
Contributor

@joaohf joaohf commented Jun 8, 2024

Hi,

When building Erlang/OTP 27 with GCC 14.1.0, I got some compilations errors.

Thanks.

Copy link
Contributor

github-actions bot commented Jun 8, 2024

CT Test Results

    3 files    143 suites   49m 46s ⏱️
1 591 tests 1 541 ✅ 49 💤 1 ❌
2 330 runs  2 255 ✅ 74 💤 1 ❌

For more details on these failures, see this check.

Results for commit f5ac901.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@rickard-green rickard-green added the team:VM Assigned to OTP team VM label Jun 10, 2024
@jhogberg jhogberg self-assigned this Jun 10, 2024
@jhogberg jhogberg added testing currently being tested, tag is used by OTP internal CI and removed testing currently being tested, tag is used by OTP internal CI labels Jun 10, 2024
Copy link
Contributor

@jhogberg jhogberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! It looks good aside from a small issue that broke float_SUITE. :-)

erts/emulator/test/float_SUITE_data/fp_drv.c Outdated Show resolved Hide resolved
joaohf added 3 commits June 11, 2024 17:25
With GCC 14 series, the following error exists:

fp_drv.c: In function 'control':
fp_drv.c:126:48: error: passing argument 2 of 'erl_drv_thread_join' from
incompatible pointer type [-Wincompatible-pointer-types]
  126 |         else if (0 != erl_drv_thread_join(tid, &res_str))
      |                                                ^~~~~~~~
      |                                                |
      |                                                char **
In file included from fp_drv.c:43:
/build/tmp/work/core2-64-poky-linux/erlang/27.0/git/erts/emulator/beam/erl_driver.h:487:50:
note: expected 'void **' but argument is of type 'char **'
  487 | EXTERN int erl_drv_thread_join(ErlDrvTid, void **respp);
      |                                           ~~~~~~~^~~~~
With GCC 14 series, the following error exists:

dead_port.c:43:26: error: return type defaults to 'int' [-Wimplicit-int]
   43 | #define MAIN(argc, argv) main(argc, argv)
      |                          ^~~~
dead_port.c:50:1: note: in expansion of macro 'MAIN'
   50 | MAIN(argc, argv)
      | ^~~~
With GCC 14 series the following error exists:

unlink_signal_drv.c: In function 'start':
unlink_signal_drv.c:77:17: error: assignment to 'ErlDrvData' {aka
'struct _erl_drv_data *'} from incompatible pointer type 'ErlDrvPort'
{aka 'struct _erl_drv_port *'} [-Wincompatible-pointer-types]
   77 |     state->port = port;
      |                 ^
unlink_signal_drv.c: In function 'output':
unlink_signal_drv.c:86:27: error: passing argument 1 of
'driver_set_timer' from incompatible pointer type
[-Wincompatible-pointer-types]
   86 |     driver_set_timer(state->port, 2);
      |                      ~~~~~^~~~~~
      |                           |
      |                           ErlDrvData {aka struct _erl_drv_data
*}
@joaohf joaohf force-pushed the fix-errors-for-gcc-14 branch from df79492 to f5ac901 Compare June 11, 2024 20:27
@joaohf joaohf requested a review from jhogberg June 11, 2024 22:31
@jhogberg jhogberg added the testing currently being tested, tag is used by OTP internal CI label Jun 12, 2024
@jhogberg jhogberg merged commit 2b3a727 into erlang:master Jun 14, 2024
15 of 17 checks passed
@jhogberg
Copy link
Contributor

Merged, thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants