]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Document peculiarities of BOOLEAN_TYPE
authorEric Botcazou <ebotcazou@gcc.gnu.org>
Thu, 17 Apr 2025 18:46:57 +0000 (20:46 +0200)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Thu, 17 Apr 2025 18:48:26 +0000 (20:48 +0200)
gcc/
* tree.def (BOOLEAN_TYPE): Add more details.

gcc/tree.def

index c4ad8d08f10ce61326657c3647b4fbfcd0f04875..2c37e449442d65584acde95aff41894e5419f8d4 100644 (file)
@@ -135,7 +135,11 @@ DEFTREECODE (OFFSET_TYPE, "offset_type", tcc_type, 0)
 DEFTREECODE (ENUMERAL_TYPE, "enumeral_type", tcc_type, 0)
 
 /* Boolean type (true or false are the only values).  Looks like an
-   INTEGRAL_TYPE.  */
+   INTEGER_TYPE, but must be dealt with specially because TYPE_PRECISION
+   may be arbitrary despite the restricted set of valid values (in other
+   words, boolean types with TYPE_PRECISION > 1 exist in some languages).
+   Similarly, TYPE_UNSIGNED may be false for components of vector masks,
+   as well as for boolean types in languages other than C.  */
 DEFTREECODE (BOOLEAN_TYPE, "boolean_type", tcc_type, 0)
 
 /* Integer types in all languages, including char in C.