timbunce / devel-nytprof

Devel::NYTProf is a powerful feature-rich source code profiler for Perl. (Mostly in maintenance mode, so PRs are much more likely to be acted upon than Issues.)
http://blog.timbunce.org/tag/nytprof/
67 stars 50 forks source link

Build-time warnings using clang14 as compiler #212

Closed jkeenan closed 9 months ago

jkeenan commented 9 months ago

In the course of preparing Devel-NYTProf for its version 6.13 release (performed today), I conducted most of the development work on Ubuntu Linux 22.04 LTS, where gcc-11.0.4 is the default C-compiler. And my default perl there is 5.38.0. make ran with no build-time warnings.

Before releasing I also tested on FreeBSD-13, where clang-14.0.6 is the default C-compiler and the vendor perl is 5.32.1. In this environment, make emitted hundreds of -Wcompound-token-split-by-macro warnings.

$ report-build-warnings 1b97413bcd.freebsd.threaded.clang14.make.output.txt.gz 
File:  1b97413bcd.freebsd.threaded.clang14.make.output.txt.gz

  Wcompound-token-split-by-macro           446

Having observed this warnings category with clang14 during Perl 5 development over the last couple of years, I suspected that if I tried to build the distribution with a more recent perl, I would get fewer build-time warnings. Using perl-5.39.3, this proved to be the case, though we're still left with hundreds of such warnings.

$ report-build-warnings 1b97413bcd.freebsd.threaded.clang14.perl-5.39.3.make.output.txt.gz
File:  1b97413bcd.freebsd.threaded.clang14.perl-5.39.3.make.output.txt.gz

  Wcompound-token-split-by-macro           240

I will consult with people more knowledgeable about compilers than I am.

jkeenan commented 9 months ago

This is where these build-time warnings were discussed in the Perl 5 issue tracker: https://github.com/Perl/perl5/issues/18780.

jkeenan commented 9 months ago

This should be addressed by the release of version 6.14 today.