aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/frontend-passes.c
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2019-04-11 15:36:59 +0000
committerTom de Vries <vries@gcc.gnu.org>2019-04-11 15:36:59 +0000
commitcd7ffd8a9382c78725f3c09b317bdb4739d3654b (patch)
tree4a08e65bc698b0c31880d7529f36992deb14011a /gcc/fortran/frontend-passes.c
parent657184d086a57eb214dda530035563a1ecc3df10 (diff)
downloadgcc-cd7ffd8a9382c78725f3c09b317bdb4739d3654b.zip
gcc-cd7ffd8a9382c78725f3c09b317bdb4739d3654b.tar.gz
gcc-cd7ffd8a9382c78725f3c09b317bdb4739d3654b.tar.bz2
[doc] Note variable shadowing at max macro using statement expression
When suggesting to rewrite the unsafe (with respect to multiple evaluation of arguments) macro definition: ... #define max(a,b) ((a) > (b) ? (a) : (b)) ... into the safe macro definition: ... #define maxint(a,b) \ ({int _a = (a), _b = (b); _a > _b ? _a : _b; }) ... mention the variable shadowing problem for: ... #define maxint3(a, b, c) \ ({int _a = (a), _b = (b), _c = (c); maxint (maxint (_a, _b), _c); }) ... 2019-04-11 Tom de Vries <tdevries@suse.de> * doc/extend.texi (@node Statement Exprs): Note variable shadowing at max macro using statement expression. From-SVN: r270287
Diffstat (limited to 'gcc/fortran/frontend-passes.c')
0 files changed, 0 insertions, 0 deletions