Summary
This issue created to handle proccess of implementing warnings. Previously, the compiler lacked a structured way to report non-fatal diagnostics, and this work establishes the architectural foundation for all future warning categories and reporting mechanisms.
Specification
Command Line Interface (CLI)
The compiler must provide granular control over which diagnostics are emitted or silenced.
- Flag
-W<group>: Enables a specific set of warnings.
- Format: Kebab-case (e.g.,
-Wunused-variable, -Wshadow).
- Behavior: Can be specified multiple times to enable different WarningsSet groups.
- Flag
-w: Global silent mode. Suppresses all warning output regardless of other flags.
- Flag
-Werror: Promotes warnings to errors.
-Werror: All enabled warnings become fatal.
-Werror=<group>: Only warnings within the specified group become fatal.
Warnings Sets
We aim for compatibility with standard GCC/Clang warning options where applicable.
Reference: GCC Warning Options (https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html)
Goals & Tasks:
Remark: For now the CompilerWarning record uses zero position. When we move on implemention positional info, we have to add Position field to this record.
Summary
This issue created to handle proccess of implementing warnings. Previously, the compiler lacked a structured way to report non-fatal diagnostics, and this work establishes the architectural foundation for all future warning categories and reporting mechanisms.
Specification
Command Line Interface (CLI)
The compiler must provide granular control over which diagnostics are emitted or silenced.
-W<group>: Enables a specific set of warnings.-Wunused-variable,-Wshadow).-w: Global silent mode. Suppresses all warning output regardless of other flags.-Werror: Promotes warnings to errors.-Werror: All enabled warnings become fatal.-Werror=<group>: Only warnings within the specified group become fatal.Warnings Sets
We aim for compatibility with standard GCC/Clang warning options where applicable.
Reference: GCC Warning Options (https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html)
Goals & Tasks:
-Woption [Implement compiler warnings #978]-woption-Werrorand-Werror=<group>-Werrorwith filters to produce error on all or particular warnings.Remark: For now the CompilerWarning record uses zero position. When we move on implemention positional info, we have to add
Positionfield to this record.