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
Fix Issue #144, spurious warnings from -Wc++-compate, and a few related nits #168
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Currently when building Encode as part of core perl it produces a large number of warnings like this: byte_t.c:10394:24: warning: duplicate declaration of ‘utf8_viscii’ is invalid in C++ [-Wc++-compat] 10394 | static const encpage_t utf8_viscii[12] = { | ^~~~~~~~~~~ byte_t.c:322:24: note: previous declaration of ‘utf8_viscii’ was here 322 | static const encpage_t utf8_viscii[]; | ^~~~~~~~~~~ These -Wc++-compat warnings are bogus as the generated code uses define guards to compile differently under C++ and C, the code producing the warnings simply will not be compiled under C++ so simply silence the warning. This patch only applies to builds under GCC, but that is probably the bulk of our core perl builders. Thanks to Leon Timmermans for the pragma used in this patch. This should fix Perl/perl5#19588 and dankogai#144
The first if in this sequence has a comment which says: "VMS may have upcased filenames with DECC$ARGV_PARSE_STYLE defined" but only the *first* clause actually uses /i to match the filename extensions. This patch consistently uses /i for all the clauses, it also removes an unused filename capture.
The message says "skipped in 5.26", but the code actually skips in 5.25 or later. Make the skip messages more correct and less confusing.
Thank you. Since this PR resolves compiler issues of Perl main I will $VERSION++ right after this. Dan |
On Thu, 7 Apr 2022 at 05:00, Dan Kogai ***@***.***> wrote:
Thank you. Since this PR resolves compiler issues of Perl main I will
$VERSION++ right after this.
Just for future reference, do you prefer PR's to include version bumps?
Some cpan authors do, some don't, so I usually don't unless I know for sure
they prefer it.
cheers,
Yves
…--
perl -Mre=debug -e "/just|another|perl|hacker/"
|
Well, I just want to make sure dankogai/p5-Encode is sync w/ perl/perl5 since Encode is part of it.
Dan
… On Apr 7, 2022, at 12:43, Yves Orton ***@***.***> wrote:
On Thu, 7 Apr 2022 at 05:00, Dan Kogai ***@***.***> wrote:
> Thank you. Since this PR resolves compiler issues of Perl main I will
> $VERSION++ right after this.
>
Just for future reference, do you prefer PR's to include version bumps?
Some cpan authors do, some don't, so I usually don't unless I know for sure
they prefer it.
cheers,
Yves
--
perl -Mre=debug -e "/just|another|perl|hacker/"
—
Reply to this email directly, view it on GitHub <#168 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAAQZTD5G5UQ4TMECW4MRTTVDZKXJANCNFSM5SUYZ4AQ>.
You are receiving this because you modified the open/close state.
|
kraj
pushed a commit
to YoeDistro/meta-openembedded
that referenced
this pull request
Apr 25, 2022
Changelog: ========== ! bin/enc2xs t/enc_data.t t/enc_module.t t/encoding.t t/jperl.t Pulled: Fix Issue openembedded#144, spurious warnings from -Wc++-compate, and a few related nits dankogai/p5-encode#168 ! MANIFEST add t/utf32warnings.t which was missing ! t/taint.t Pulled: Skip taint tests if your perl was built without taint support dankogai/p5-encode#167 ! Unicode/Unicode.pm Pulled: fix link to Unicode standard dankogai/p5-encode#165 ! t/Unicode_trailing_nul.t Pulled: Use note() instead of diag() dankogai/p5-encode#164 Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
kraj
pushed a commit
to YoeDistro/meta-openembedded
that referenced
this pull request
Apr 25, 2022
Changelog: ========== ! bin/enc2xs t/enc_data.t t/enc_module.t t/encoding.t t/jperl.t Pulled: Fix Issue openembedded#144, spurious warnings from -Wc++-compate, and a few related nits dankogai/p5-encode#168 ! MANIFEST add t/utf32warnings.t which was missing ! t/taint.t Pulled: Skip taint tests if your perl was built without taint support dankogai/p5-encode#167 ! Unicode/Unicode.pm Pulled: fix link to Unicode standard dankogai/p5-encode#165 ! t/Unicode_trailing_nul.t Pulled: Use note() instead of diag() dankogai/p5-encode#164 Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
halstead
pushed a commit
to openembedded/meta-openembedded
that referenced
this pull request
May 3, 2022
Changelog: ========== ! bin/enc2xs t/enc_data.t t/enc_module.t t/encoding.t t/jperl.t Pulled: Fix Issue #144, spurious warnings from -Wc++-compate, and a few related nits dankogai/p5-encode#168 ! MANIFEST add t/utf32warnings.t which was missing ! t/taint.t Pulled: Skip taint tests if your perl was built without taint support dankogai/p5-encode#167 ! Unicode/Unicode.pm Pulled: fix link to Unicode standard dankogai/p5-encode#165 ! t/Unicode_trailing_nul.t Pulled: Use note() instead of diag() dankogai/p5-encode#164 Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit a21bab9) Signed-off-by: Armin Kuster <akuster808@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This silences the copious warnings produced by modern versions of gcc when compiling with -Wc++-compat. These warnings are bogus as the code actually has different codepaths via defines for C++ and C, so warning about C code that wont compile in C++ is not helpful.
This also fixes a few other minor nits I noticed when building and testing.
The Perl issue this fixes is: Perl/perl5#19588
The Encode issues this fixes is: #144