Skip to content

lib: prefix macros UNUSED and FALLTHROUGH#7309

Merged
nilason merged 3 commits intoOSGeo:mainfrom
nilason:fix_prefix_macros
Apr 16, 2026
Merged

lib: prefix macros UNUSED and FALLTHROUGH#7309
nilason merged 3 commits intoOSGeo:mainfrom
nilason:fix_prefix_macros

Conversation

@nilason
Copy link
Copy Markdown
Contributor

@nilason nilason commented Apr 13, 2026

Prefix the preprocessing macros UNUSED and FALLTHROUGH with G_ to avoid conflicts with third party software.

This is something I have long planned to do. For example, there was an issue for QGIS, which they solved in qgis/QGIS#55018; one of the addons was also affected OSGeo/grass-addons#1626.

@nilason nilason added this to the 8.5.0 milestone Apr 13, 2026
@nilason nilason added the backport to 8.5 PR needs to be backported to release branch 8.5 label Apr 13, 2026
@github-actions github-actions Bot added vector Related to vector data processing raster Related to raster data processing C Related code is in C C++ Related code is in C++ database Related to database management libraries module display imagery raster3d misc labels Apr 13, 2026
@nilason nilason requested review from echoix and wenzeslaus April 16, 2026 10:36
echoix
echoix previously approved these changes Apr 16, 2026
Copy link
Copy Markdown
Member

@echoix echoix left a comment

Choose a reason for hiding this comment

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

Read fast on all files, looks fine.
How will we communicate the changes?
Is there something to adapt for the ctypegen python bindings?

What bugs me a bit is that we can't really rely on the Doxygen docs to show the change, as it is only one version for all grass8, and it kinda changes a lot. Like, we wouldn't know for grass8.4 what was possible?

@nilason
Copy link
Copy Markdown
Contributor Author

nilason commented Apr 16, 2026

Read fast on all files, looks fine. How will we communicate the changes?

It is supposed to be of internal use, so I think not necessary.

Is there something to adapt for the ctypegen python bindings?

No, this is for c/c++ compiler only.

What bugs me a bit is that we can't really rely on the Doxygen docs to show the change, as it is only one version for all grass8, and it kinda changes a lot. Like, we wouldn't know for grass8.4 what was possible?

Thanks, doxygen needs to be updated, just pushed a commit! Otherwise the macro is only to silence compiler warnings.

@nilason nilason enabled auto-merge (squash) April 16, 2026 15:40
@nilason nilason merged commit 5a31d54 into OSGeo:main Apr 16, 2026
26 checks passed
@nilason nilason removed the backport to 8.5 PR needs to be backported to release branch 8.5 label Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C Related code is in C C++ Related code is in C++ database Related to database management display imagery libraries misc module raster Related to raster data processing raster3d vector Related to vector data processing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants