Skip to content

Possible misoptimization with LTO? #4026

@NTULINUX

Description

@NTULINUX
Linking halrmt
hal/utils/../hal_priv.h:135:27: warning: type of ‘hal_data’ does not match original declaration [-Wlto-type-mismatch]
  135 | extern struct hal_data_t *hal_data;
      |                           ^
hal/utils/../hal_priv.h:248:16: note: type ‘struct hal_data_t’ should match type ‘struct hal_data_t’
  248 | typedef struct hal_data_t {
      |                ^
hal/utils/../hal_priv.h:135:27: note: ‘hal_data’ was previously declared here
  135 | extern struct hal_data_t *hal_data;
      |                           ^
hal/utils/../hal_priv.h:135:27: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
Linking halmeter

Happens when building LinuxCNC with -flto and GCC 16.

Metadata

Metadata

Assignees

No one assigned

    Labels

    won't-fixBugs that aren't bugs or things that can't be fixed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions