Skip to content

Conversation

@helehto
Copy link
Contributor

@helehto helehto commented Jul 27, 2025

Commit eca1ac1 (#14252) added support for properly detecting the -Wno-vla-larger-than flag: a value must be specified for its positive form (-Wvla-larger-than=N), or GCC will exit with the error "missing argument to ‘-Walloc-size-larger-than=’".

There is a handful of other -Wno-* flags whose positive form act in the same manner, but are not covered here:

  • -Wno-alloc-size-larger-than (GCC >=7.1.0)
  • -Wno-alloca-larger-than (GCC >=7.1.0)
  • -Wno-frame-larger-than (GCC >=4.4.0)
  • -Wno-stack-usage (GCC >=4.7.0)

Add logic to treat these in the same way.

@helehto helehto requested review from dcbaker and jpakkane as code owners July 27, 2025 08:03
@helehto helehto marked this pull request as draft July 27, 2025 08:05
@bonzini bonzini added this to the 1.9 milestone Jul 27, 2025
Commit eca1ac1 (mesonbuild#14252) added support
for properly detecting the -Wno-vla-larger-than flag: a value must be
specified for its positive form (-Wvla-larger-than=N), or GCC will exit
with the error "missing argument to ‘-Walloc-size-larger-than=’".

There is a handful of other -Wno-* flags whose positive form act in the
same manner, but are not covered here:

  * -Wno-alloc-size-larger-than (GCC >=7.1.0)
  * -Wno-alloca-larger-than (GCC >=7.1.0)
  * -Wno-frame-larger-than (GCC >=4.4.0)
  * -Wno-stack-usage (GCC >=4.7.0)

Add logic to treat these in the same way.

Signed-off-by: Henrik Lehtonen <eigengrau@vm86.se>
@helehto helehto force-pushed the more-wno-handling branch from b489278 to f3cf0e4 Compare July 27, 2025 08:14
@helehto helehto marked this pull request as ready for review July 27, 2025 09:18
Copy link
Collaborator

@bonzini bonzini left a comment

Choose a reason for hiding this comment

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

Looks good.

@jpakkane jpakkane merged commit e501a22 into mesonbuild:master Jul 28, 2025
34 checks passed
@bonzini bonzini modified the milestones: 1.9, 1.8.3 Jul 29, 2025
@helehto helehto deleted the more-wno-handling branch July 29, 2025 07:51
Comment on lines +1280 to +1286
elif arg in {
'-Wno-alloc-size-larger-than',
'-Wno-alloca-larger-than',
'-Wno-frame-larger-than',
'-Wno-stack-usage',
'-Wno-vla-larger-than',
}:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
elif arg in {
'-Wno-alloc-size-larger-than',
'-Wno-alloca-larger-than',
'-Wno-frame-larger-than',
'-Wno-stack-usage',
'-Wno-vla-larger-than',
}:
elif arg in {'-Wno-alloc-size-larger-than',
'-Wno-alloca-larger-than',
'-Wno-frame-larger-than',
'-Wno-stack-usage',
'-Wno-vla-larger-than'}:

Just a small nit. It's difficult to read code when the condition for the if is dedented back, and the conditional lines up with and blends into the body.

The dedent style is unfortunately popularized somewhat by "black" (whose stated goal is not "readable code") but is best avoided.

Fixed via 8c9bf41.

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.

4 participants