US 11,941,382 B2
User customizable compiler attributes for code checking
Ulrich Drepper, Grasbrunn (DE)
Assigned to Red Hat, Inc., Raleigh, NC (US)
Filed by Red Hat, Inc., Raleigh, NC (US)
Filed on Feb. 7, 2022, as Appl. No. 17/665,832.
Prior Publication US 2023/0251837 A1, Aug. 10, 2023
Int. Cl. G06F 8/41 (2018.01)
CPC G06F 8/437 (2013.01) 20 Claims
OG exemplary drawing
 
1. A method comprising:
accessing, by a processing device executing a compiler, a source code that comprises a customized compiler attribute;
detecting, by the processing device, the customized compiler attribute;
deriving, by the processing device, a definition and logic associated with the customized compiler attribute from source code;
executing, by the processing device executing the compiler, a function of the compiler to check a targeted programming construct at a location in the source code using the derived logic associated with the customized compiler attribute;
determining, by the processing device executing the compiler, whether to generate a message indicating a status of the check; and
generating, by the processing device executing the compiler, object code based on the source code.