https://gcc.gnu.org/g:b7330efa91561d862f6af10fbc8596170109e17d
commit r17-1671-gb7330efa91561d862f6af10fbc8596170109e17d Author: Paul Iannetta <[email protected]> Date: Thu Oct 6 16:34:00 2022 +0200 Make 'gcc/tree.h:ENCODE_QUAL_ADDR_SPACE' safer to use As pointed out by Paul Iannetta in his "[RFC] c++: parser - Support for target address spaces in C++". Fix-up for Subversion r153572 (Git commit 09e881c9e21a9209b2092e400ea4c38948614f78) "Named address spaces: core middle-end support". gcc/ * tree.h (ENCODE_QUAL_ADDR_SPACE): Add missing parentheses. Co-authored-by: Thomas Schwinge <[email protected]> Diff: --- gcc/tree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/tree.h b/gcc/tree.h index 0774d6bd5a09..6aacb4df7c8a 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -2542,7 +2542,7 @@ extern tree vector_element_bits_tree (const_tree); /* Encode/decode the named memory support as part of the qualifier. If more than 8 qualifiers are added, these macros need to be adjusted. */ -#define ENCODE_QUAL_ADDR_SPACE(NUM) ((NUM & 0xFF) << 8) +#define ENCODE_QUAL_ADDR_SPACE(NUM) (((NUM) & 0xFF) << 8) #define DECODE_QUAL_ADDR_SPACE(X) (((X) >> 8) & 0xFF) /* Return all qualifiers except for the address space qualifiers. */
