Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 906018 - x11-libs/gtk+-2.24.33-r2: gdkalias.h:12:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
Summary: x11-libs/gtk+-2.24.33-r2: gdkalias.h:12:5: warning: macro expansion producing...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
Keywords: PATCH
Depends on:
Reported: 2023-05-09 11:57 UTC by nvinson234
Modified: 2023-05-09 12:48 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---

cpp_macro_fix.patch (cpp_macro_fix.patch,1.87 KB, patch)
2023-05-09 11:59 UTC, nvinson234
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description nvinson234 2023-05-09 11:57:53 UTC
When building with clang-16, this warning appears many times in the build log. The warning is correct; however, it appears so frequently that it makes finding the actual build error more difficult given the noise.

Reproducible: Always

Steps to Reproduce:
1. Build the library with clang-16
2. Observe the frequent undefined behavior warning messages.
Actual Results:  
Many undefined behavior warning messages appear.

Expected Results:  
Ideally, no warning messages.

The request isn't to fix every warning as gtk+-2 is an essentially dead package. However, removing these warnings could make diagnosing future build failures easier.
Comment 1 nvinson234 2023-05-09 11:59:18 UTC
Created attachment 861386 [details, diff]

Updates the perl scripts responsible for the noisy undefined error warnings to generate the code in a different manner that prevents the warnings.