summaryrefslogtreecommitdiffstats
path: root/gl/intprops.h
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2025-12-28 12:50:39 +0100
committerGitHub <noreply@github.com>2025-12-28 12:50:39 +0100
commite7dd07c8025b169b7b43b955066a7200d9cdf244 (patch)
tree6e8c927cfc67f3708b91ac79df07707af26e4929 /gl/intprops.h
parent828a9720b10814c5836d03aa35af05d196c4104b (diff)
parentb0afb8fe0ff1d87165af9df61501197a06240dda (diff)
downloadmonitoring-plugins-e7dd07c8.tar.gz
Merge pull request #2213 from RincewindsHat/update/gnulib
Sync with Gnulib stable-202507 code (a8ac9f9ce5)
Diffstat (limited to 'gl/intprops.h')
-rw-r--r--gl/intprops.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/gl/intprops.h b/gl/intprops.h
index 43734f34..2f9fa0a0 100644
--- a/gl/intprops.h
+++ b/gl/intprops.h
@@ -1,6 +1,6 @@
1/* intprops.h -- properties of integer types 1/* intprops.h -- properties of integer types
2 2
3 Copyright (C) 2001-2024 Free Software Foundation, Inc. 3 Copyright (C) 2001-2025 Free Software Foundation, Inc.
4 4
5 This program is free software: you can redistribute it and/or modify it 5 This program is free software: you can redistribute it and/or modify it
6 under the terms of the GNU Lesser General Public License as published 6 under the terms of the GNU Lesser General Public License as published
@@ -34,6 +34,14 @@
34 signed or floating type. Do not evaluate E. */ 34 signed or floating type. Do not evaluate E. */
35#define EXPR_SIGNED(e) _GL_EXPR_SIGNED (e) 35#define EXPR_SIGNED(e) _GL_EXPR_SIGNED (e)
36 36
37/* The same value as as the arithmetic expression E, but with E's type
38 after integer promotions. For example, if E is of type 'enum {A, B}'
39 then 'switch (INT_PROMOTE (E))' pacifies gcc -Wswitch-enum if some
40 enum values are deliberately omitted from the switch's cases.
41 Here, unary + is safer than a cast or inline function, as unary +
42 does only integer promotions and is disallowed on pointers. */
43#define INT_PROMOTE(e) (+ (e))
44
37 45
38/* Minimum and maximum values for integer types and expressions. */ 46/* Minimum and maximum values for integer types and expressions. */
39 47