]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/doc/analyzer.texi
c, analyzer: support named constants in analyzer [PR106302]
[thirdparty/gcc.git] / gcc / doc / analyzer.texi
index ec49f951435d4a3b6fc3cf37e58b6042748d43ca..d61b55cec5aa027bf2a94bc750f3bd19dc3d0588 100644 (file)
@@ -524,6 +524,23 @@ With a non-zero argument
 
 it will also dump all of the states within the ``processed'' nodes.
 
+The builtin @code{__analyzer_dump_named_constant} will emit a warning
+during analysis describing what is known about the value of a given
+named constant, for parts of the analyzer that interact with target
+headers.
+
+For example:
+
+@smallexample
+__analyzer_dump_named_constant ("O_RDONLY");
+@end smallexample
+
+might emit the warning:
+
+@smallexample
+warning: named constant 'O_RDONLY' has value '1'
+@end smallexample
+
 @smallexample
    __analyzer_dump_region_model ();
 @end smallexample