Comments (6)
#190 -- which is a cherry-pick of a patch from @rurban from 2 years ago -- appears to clear up most of these warnings. Here is my before/after comparison:
Effect of applying rurban patch 5599d1a in branch gpp-build-time-warnings-20210505
[perlmonger: devel-nytprof] $ ~/bin/perl/report-build-warnings gpp.master.output.txt
File: gpp.master.output.txt
Wliteral-suffix 35
Wwrite-strings 3
[perlmonger: devel-nytprof] $ ~/bin/perl/report-build-warnings gpp.branch.output.txt
File: gpp.branch.output.txt
Wwrite-strings 3
from devel-nytprof.
With one more commit to the gpp-build-time-warnings-20210505 branch (#190), we can reduce the remaining number of g++ build-time warnings from 3 to 2.
~/bin/perl/report-build-warnings gpp.branch.output.2nd.txt
File: gpp.branch.output.2nd.txt
Wwrite-strings 2
from devel-nytprof.
With release of CPAN version 6.10, 2 -Wwrite-strings
build-time warnings remain when compiling with g++
.
from devel-nytprof.
With release of CPAN version 6.10, 2
-Wwrite-strings
build-time warnings remain when compiling withg++
.
$ parse-build-warnings 5c915c93d2.freebsd.g++9.make.output.txt.gz
File: 5c915c93d2.freebsd.g++9.make.output.txt.gz
[
{
char => 37,
group => "Wwrite-strings",
line => 226,
source => "NYTProf.xs",
text => "ISO C++ forbids converting a string constant to 'char*'",
},
{
char => 37,
group => "Wwrite-strings",
line => 231,
source => "NYTProf.xs",
text => "ISO C++ forbids converting a string constant to 'char*'",
},
]
from devel-nytprof.
My local and remote machines have been upgraded. Here is a status update on warnings emitted during make
when compiling Devel-NYTProf (master branch) with the default versions of g++
.
Ubuntu Linux 22.04 LTS
$ g++ --version | head -n 1
g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
$ report-build-warnings 2a11e63e8d.linux.g++-11.make.output.txt.gz
File: 2a11e63e8d.linux.g++-11.make.output.txt.gz
Wregister 4
Wwrite-strings 2
$ parse-build-warnings 2a11e63e8d.linux.g++-11.make.output.txt.gz
File: 2a11e63e8d.linux.g++-11.make.output.txt.gz
[
{
char => 37,
group => "Wwrite-strings",
line => 226,
source => "NYTProf.xs",
text => "ISO C++ forbids converting a string constant to \xE2\x80\x98char*\xE2\x80\x99",
},
{
char => 37,
group => "Wwrite-strings",
line => 231,
source => "NYTProf.xs",
text => "ISO C++ forbids converting a string constant to \xE2\x80\x98char*\xE2\x80\x99",
},
{
char => 28,
group => "Wregister",
line => 1281,
source => "NYTProf.xs",
text => "ISO C++17 does not allow \xE2\x80\x98register\xE2\x80\x99 storage class specifier",
},
{
char => 18,
group => "Wregister",
line => 1407,
source => "NYTProf.xs",
text => "ISO C++17 does not allow \xE2\x80\x98register\xE2\x80\x99 storage class specifier",
},
{
char => 28,
group => "Wregister",
line => 1408,
source => "NYTProf.xs",
text => "ISO C++17 does not allow \xE2\x80\x98register\xE2\x80\x99 storage class specifier",
},
{
char => 28,
group => "Wregister",
line => 1409,
source => "NYTProf.xs",
text => "ISO C++17 does not allow \xE2\x80\x98register\xE2\x80\x99 storage class specifier",
},
]
FreeBSD-13
$ g++ --version | head -n 1
g++ (FreeBSD Ports Collection) 12.2.0
$ report-build-warnings 2a11e63e8d.freebsd.threaded.gcc12.make.output.tx
t.gz
File: 2a11e63e8d.freebsd.threaded.gcc12.make.output.txt.gz
Wregister 4
Wwrite-strings 2
$ parse-build-warnings 2a11e63e8d.freebsd.threaded.gcc12.make.output.txt.gz
File: 2a11e63e8d.freebsd.threaded.gcc12.make.output.txt.gz
[
{
char => 37,
group => "Wwrite-strings",
line => 226,
source => "NYTProf.xs",
text => "ISO C++ forbids converting a string constant to 'char*'",
},
{
char => 37,
group => "Wwrite-strings",
line => 231,
source => "NYTProf.xs",
text => "ISO C++ forbids converting a string constant to 'char*'",
},
{
char => 28,
group => "Wregister",
line => 1281,
source => "NYTProf.xs",
text => "ISO C++17 does not allow 'register' storage class specifier",
},
{
char => 18,
group => "Wregister",
line => 1407,
source => "NYTProf.xs",
text => "ISO C++17 does not allow 'register' storage class specifier",
},
{
char => 28,
group => "Wregister",
line => 1408,
source => "NYTProf.xs",
text => "ISO C++17 does not allow 'register' storage class specifier",
},
{
char => 28,
group => "Wregister",
line => 1409,
source => "NYTProf.xs",
text => "ISO C++17 does not allow 'register' storage class specifier",
},
]
So on both platforms g++
is now emitting -Wregister
warnings related to C++17. Context (from the FreeBSD run):
NYTProf.xs: In function ‘int dopopcx_at(PerlInterpreter*, PERL_CONTEXT*, I32, UV)’:
NYTProf.xs:1281:28: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
1281 | register PERL_CONTEXT *cx;
| ^~
NYTProf.xs: In function ‘PERL_CONTEXT* visit_contexts(PerlInterpreter*, UV, int (*)(PerlInterpreter*, PERL_CONTEXT*, UV*))’:
NYTProf.xs:1407:18: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
1407 | register I32 cxix = cxstack_ix;
| ^~~~
NYTProf.xs:1408:28: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
1408 | register PERL_CONTEXT *cx = NULL;
| ^~
NYTProf.xs:1409:28: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
1409 | register PERL_CONTEXT *ccstack = cxstack;
| ^~~~~~~
I don't follow C++ development. Is there anyone who could shed some light on this?
from devel-nytprof.
The 4 -Wregister
warnings should be gone as of version 6.13 of Devel-NYTProf, uploaded just now to CPAN. That should leave the 2 -Wwrite-strings
warnings.
from devel-nytprof.
Related Issues (20)
- NV size 8 but ours is 16 HOT 9
- Error 'File uses compression but compression is not supported by this build' in 6.08 HOT 8
- t/30-util.t: fmt_float error on certain Windows/Strawberry Perl builds HOT 9
- t/12-data.t fails on s390x HOT 2
- Makefile.PL: remove or replace targets using 'svn' HOT 1
- NYTProf organization HOT 2
- Devel::NYTProf::Apache: discourage or spin off to new distribution HOT 1
- Makefile.PL: How to create a `disttest_author` target to run as part of `make dist` HOT 2
- Build-time warnings on quadmath builds HOT 1
- nytprofhtml - internal anchor links in html pages go to wrong locations HOT 15
- travis-ci.org CI is gone; propose removal of config file HOT 2
- Propose removal of bin/nytprofpf HOT 1
- Don't request 'bad-function-cast' warnings during 'make' HOT 1
- enable appveyor for the main repo HOT 2
- Unstable results on macOS HOT 1
- Build-time warnings using clang14 as compiler HOT 2
- Makefile.PL uses wrong system header path when Perl has been compiled with -Dsysroot HOT 3
- Using a custom include and libs path for zlib HOT 5
- Call graph dot files missing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from devel-nytprof.