Bug 1696441 - Warning without actual warning when compiling WebKit
Summary: Warning without actual warning when compiling WebKit
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 30
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-04-04 20:42 UTC by Michael Catanzaro
Modified: 2020-05-01 08:45 UTC (History)
9 users (show)

Fixed In Version: gcc-9.0.1-0.13.fc30
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-01 08:45:57 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Preprocessed source (886.07 KB, text/plain)
2019-04-04 20:42 UTC, Michael Catanzaro
no flags Details


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 89985 0 P3 RESOLVED [9 Regression] Stray notes from OPT_Waddress_of_packed_member with -w 2020-05-01 08:44:36 UTC

Description Michael Catanzaro 2019-04-04 20:42:36 UTC
Created attachment 1552073 [details]
Preprocessed source

Description of problem: I get this compiler warning when compiling WebKitGTK with GCC 9, but there's not actually any warning, only meaningless notes:

[1478/4718] Building C object Source/ThirdParty/libwebrtc...rty/usrsctp/usrsctplib/usrsctplib/netinet/sctp_output.c.o
In file included from ../../Source/ThirdParty/libwebrtc/Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_output.c:46:
../../Source/ThirdParty/libwebrtc/Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_output.c: In function ‘send_forward_tsn’:
../../Source/ThirdParty/libwebrtc/Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_header.h:407:8: note: defined here
  407 | struct sctp_forward_tsn_chunk {
      |        ^~~~~~~~~~~~~~~~~~~~~~
../../Source/ThirdParty/libwebrtc/Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_header.h:418:8: note: defined here
  418 | struct sctp_strseq_mid {
      |        ^~~~~~~~~~~~~~~
../../Source/ThirdParty/libwebrtc/Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_output.c: In function ‘sctp_send_sack’:
../../Source/ThirdParty/libwebrtc/Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_header.h:265:8: note: defined here
  265 | struct sctp_gap_ack_block {
      |        ^~~~~~~~~~~~~~~~~~

That's the full output.


Version-Release number of selected component (if applicable): gcc-9.0.1-0.10.fc30


How reproducible: Always


Steps to Reproduce:
1. Download preprocessed source sctp_output.i (attached)
2. Build it as below

Actual results:

$ gcc -fdiagnostics-color=always -Wextra -Wall -Wno-expansion-to-defined -Wno-psabi -Wno-maybe-uninitialized -Wwrite-strings -Wundef -Wpointer-arith -Wmissing-format-attribute -Wformat-security -Wcast-align  -fno-strict-aliasing -fno-exceptions -gsplit-dwarf -g -fPIC -w -c sctp_output.i 
In file included from /home/mcatanzaro/Projects/WebKit/Source/ThirdParty/libwebrtc/Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_output.c:46:
/home/mcatanzaro/Projects/WebKit/Source/ThirdParty/libwebrtc/Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_output.c: In function ‘send_forward_tsn’:
../../Source/ThirdParty/libwebrtc/Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_header.h:407:8: note: defined here
../../Source/ThirdParty/libwebrtc/Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_header.h:418:8: note: defined here
/home/mcatanzaro/Projects/WebKit/Source/ThirdParty/libwebrtc/Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_output.c: In function ‘sctp_send_sack’:
../../Source/ThirdParty/libwebrtc/Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_header.h:265:8: note: defined here


Expected results: Either a proper warning to go with the notes, or no notes


Additional info: Cats can rotate their ears 180 degrees.

Comment 1 Dave Malcolm 2019-04-04 21:01:06 UTC
Thanks for filing this (and for the additional info relating to feline aural capabilities).

The notes are followups to -Waddress-of-packed-member warnings, which aren't being properly guarded by emission of that warning in c-family/c-warn.c:

2776		      warning_at (location, OPT_Waddress_of_packed_member,
2777				  "converting a packed %qT pointer (alignment %d) "
2778				  "to a %qT pointer (alignment %d) may result in an "
2779				  "unaligned pointer value",
2780				  rhstype, rhs_align, type, type_align);
2781		      tree decl = TYPE_STUB_DECL (rhstype);
2782		      if (decl)
2783			inform (DECL_SOURCE_LOCATION (decl), "defined here");
2784		      decl = TYPE_STUB_DECL (type);
2785		      if (decl)
2786			inform (DECL_SOURCE_LOCATION (decl), "defined here");

Comment 2 Dave Malcolm 2019-04-05 12:56:11 UTC
I've filed this upstream as https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89985 and am working on a fix.

Comment 3 Dave Malcolm 2019-04-05 15:24:12 UTC
I've fixed this upstream (in r270169).

Reassigning to Jakub, so that he can close it next time he refreshes Fedora's gcc packages.

Comment 4 Ben Cotton 2020-04-30 21:49:13 UTC
This message is a reminder that Fedora 30 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 30 on 2020-05-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '30'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 30 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.


Note You need to log in before you can comment on or make changes to this bug.