From 6c59cae7996f83e0340145ed989b72c7eee68246 Mon Sep 17 00:00:00 2001 From: Anthony Heading Date: Mon, 30 Aug 2021 20:40:12 -0400 Subject: [PATCH] Avoid gcc 11 misleading indentation warning in generated code Closes https://github.com/swig/swig/pull/2074 --- CHANGES.current | 4 ++++ Lib/perl5/perltypemaps.swg | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.current b/CHANGES.current index 3492e6df6..6bafec31c 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -7,6 +7,10 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/ Version 4.1.0 (in progress) =========================== +2021-10-03: ajrh1 + [Perl] #2074: Avoid -Wmisleading-indentation in generated code + when using gcc11. + 2021-10-03: jschueller [CMake] #2065: Add option to enable or disable PCRE support. diff --git a/Lib/perl5/perltypemaps.swg b/Lib/perl5/perltypemaps.swg index bab3d7acd..42f8887be 100644 --- a/Lib/perl5/perltypemaps.swg +++ b/Lib/perl5/perltypemaps.swg @@ -56,7 +56,9 @@ %define %set_output(obj) $result = obj; argvi++ %enddef /* append output */ -%define %append_output(obj) if (argvi >= items) EXTEND(sp, argvi+1); %set_output(obj) %enddef +%define %append_output(obj) +if (argvi >= items) EXTEND(sp, argvi+1); +%set_output(obj) %enddef /* variable output */ %define %set_varoutput(obj) sv_setsv($result,obj) %enddef