gbdev / gbdev/rgbds

Opt-in warning for `UNION`s with only one piece

Open
#1,898 0 comments 0 reactions 0 assignees View on GitHub
enhancement rgbasm
Dominant language
C++
Stars
1.6k
Forks
193
Avg merge
22h 17m
Merged PRs (30d)
26

Description

A new `-Weverything`-level warning (e.g. `-Wsingle-union` or `-Wone-block-union`) that detects `UNION`s without any `NEXTU` blocks, which may be a mistake or redundant. (I'm requesting this after having real-world cases where it would be useful.)

Contributor guide

Open the contributing guide

Research direction

Start by locating the assembler handling for UNION and NEXTU, then inspect how existing -Weverything-level warnings are registered and tested. Define the warning's behavior for UNIONs with no NEXTU blocks and confirm completion with focused diagnostic tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.