Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1696441 - Warning without actual warning when compiling WebKit
Summary: Warning without actual warning when compiling WebKit
Status: POST
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 30
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2019-04-04 20:42 UTC by Michael Catanzaro
Modified: 2019-04-05 15:24 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed:

Attachments (Terms of Use)
Preprocessed source (deleted)
2019-04-04 20:42 UTC, Michael Catanzaro
no flags Details

System ID Priority Status Summary Last Updated
GNU Compiler Collection 89985 None None None 2019-04-05 12:56:10 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 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.

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