-
Notifications
You must be signed in to change notification settings - Fork 561
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Odd warning in simple XSub (-Dusequadmath builds only) #17128
Comments
From @sisyphusHi, The Inline::C demo script: ##################### On my -Dusequadmath build of perl-5.30.0 I get the following warning during try_pl_0ea3.xs: In function ‘foo’: Upon compilation the script then runs successfully. I noticed the same warning building Scalar-List-Utils-1.51 on the same The same code compiles without warning on non-quadmath builds of perl-5.30.0 Cheers, |
From @jkeenanOn Thu, 15 Aug 2019 05:21:56 GMT, sisyphus359@gmail.com wrote:
Confirmed. Attached output is from 'make' within a git checkout of the Scalar-List-Utils distribution. The perl used to call 'perl Makefile.PL' was configured as '-des -Dusedevel -Dusequadmath'. Thank you very much. |
From @jkeenan$ make |
The RT System itself - Status changed from 'new' to 'open' |
From @jkeenanOn 8/15/19 9:37 AM, James E Keenan via RT wrote:
Curiously, I do *not* get that warning when I build a perl on linux with |
From @sisyphusOn Fri, Aug 16, 2019 at 2:19 AM James E Keenan <jkeenan@pobox.com> wrote:
That's quite strange, indeed. Here's what I see: ListUtil.xs: In function ‘XS_List__Util_uniq’: Can you check that you were attempting to build the same version (1.51) of I can only think that you must have been building Scalar-List-Utils from a As regards my build of perl-5.30.0: (I'm also seeing the same on perl-5.31.2, built with '-des -Duse64bitall Cheers, |
From @tonycozOn Wed, 14 Aug 2019 22:21:56 -0700, sisyphus359@gmail.com wrote:
Which operating system? Which compiler? Please include perl -V output when you report issues. Tony |
From @sisyphusOS is Ubuntu-18.04, current compiler is gcc-7.4.0. Here's perl -V for 5.31.2 $ perl -V Characteristics of this binary (from libperl): /home/sisyphus/blead-5.31.2-q/lib/perl5/site_perl/5.31.2/x86_64-linux-quadmath Cheers, On Tue, Aug 20, 2019 at 4:05 PM Tony Cook via RT <perlbug-followup@perl.org>
|
From @tonycozOn Mon, 19 Aug 2019 23:44:18 -0700, sisyphus359@gmail.com wrote:
What I think is happening, is somehow, -Wformat is enabled by default on your gcc, similarly for James. I don't see anything in the gcc release notes indicating that it was turned on by default, but it may have been omitted. While building perl with a quadmath build, the build of perl itself and the bundled modules includes a -Wno-format, since gcc's -Wformat checks don't understand the Q size modifier. This addition of -Wno-format isn't used while building CPAN modules after perl is installed though, so you see the warnings. If you want to check if format warnings are on by default, try building this code: #include <stdio.h> extern __float128 x; void f(void) { with: cc -c test.c which doesn't warn here with gcc 6.3.0. Tony |
From @jkeenanOn Mon, 26 Aug 2019 02:14:57 GMT, tonyc wrote:
$ uname -mrs $ gcc --version $ gcc -c 134363-test.c -- |
From @tonycozOn Sun, 25 Aug 2019 19:21:09 -0700, jkeenan wrote:
Ubuntu seem to turn on -Wformat=2 and -Wformat-security by default, from the dist diff file: +++ gcc-7-7.4.0/debian/patches/gcc-default-format-security.diff Tony |
From @sisyphusOn Mon, 26 Aug 2019 02:14:57 GMT, tonyc wrote:
Yes - that explains it. If I introduce the -Wno-format switch into the The warning makes me a little nervous. I've seen similar types of warnings Cheers, |
From @jkeenanOn Mon, 26 Aug 2019 04:38:38 GMT, tonyc wrote:
Some data which I think supports your hypothesis: ##### ##### $ sh ./Configure -des -Dusedevel -Dusequadmath -Dcc=gcc [ build and install perl; change to git checkout of Scalar-List-Utils ] $/home/jkeenan/testing/14d26b44/bin/perl -I/home/jkeenan/testing/14d26b44/lib Makefile.PL ##### $ sh ./Configure -des -Dusedevel -Dusequadmath -Dcc="gcc -Wformat=0" [ build and install perl; change to git checkout of Scalar-List-Utils ] $ /home/jkeenan/testing/9cb69123/bin/perl -I/home/jkeenan/testing/9cb69123/lib Makefile.PL -- |
From @tonycozOn Mon, 26 Aug 2019 06:02:47 -0700, sisyphus359@gmail.com wrote:
Well, from a custom perl installation point of view you could add -Wno-format to ccflags. Realise while this suppresses the unknown "Q" warnings, it will also suppress any other format issues (but except for __float128, you'll see those in non-quadmath builds.) Ideally gcc would have pragmas to register new size/format specifiers to -Wformat, and quadmath would use those. quadmath already uses the glibc mechanism to add format specifiers[1], so it seems like a reasonable extension. It doesn't seem to have come up - the first hit for google C<gcc "wformat" "quadmath"> is this ticket. Tony [1] https://www.gnu.org/software/libc/manual/html_node/Customizing-Printf.html#Customizing-Printf |
@tonycoz, @sisyphus, is there any further action we need to take on this ticket (e.g., some documentation about this peculiarity)? Thank you very much. |
No response in nearly 10 months. I will close this ticket within 7 days unless someone provides a good reason to keep it open. Thank you very much. |
Migrated from rt.perl.org#134363 (status was 'open')
Searchable as RT134363$
The text was updated successfully, but these errors were encountered: