https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111908
Bug ID: 111908 Summary: Port CheriBSD-specific compiler warnings to GCC Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: build, diagnostic Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: egallager at gcc dot gnu.org CC: jrtc27 at jrtc27 dot com Blocks: 44756, 87403 Target Milestone: --- Target: CheriBSD The GCC compile farm has a CheriBSD machine, cfarm240, where the C/C++ memory rules are stricter than normal. CheriBSD modifications to C/C++ are described in the CHERI C/C++ Programming Guide: https://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-947.pdf The document outlines a number of warnings that their compiler has for code that will break on CheriBSD, specifically: - -Wcheri-prototypes (kinda like -Wstrict-prototypes) - -Wcheri-capability-misuse (kinda like -Wint-to-pointer-cast and -Wpointer-to-int-cast; says something like "warning: cast from provenance-free integer type to pointer type will give pointer that can not be dereferenced") - -Wcheri-provenance (says something like "warning: binary expression on capability types; it is not clear which should be used as the source of provenance") Note that some of these warnings will show up in a build of GCC itself, and will cause the build to fail if configured with --enable-werror --enable-werror-always. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44756 [Bug 44756] [meta-bug] --enable-werror-always issues https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87403 [Bug 87403] [Meta-bug] Issues that suggest a new warning