[tor-bugs] #31769 [Core Tor/Tor]: -Wextra-semi causes build failure on debian bullseye

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Sep 17 15:35:19 UTC 2019


#31769: -Wextra-semi causes build failure on debian bullseye
-------------------------------------------------+-------------------------
 Reporter:  nickm                                |          Owner:  nickm
     Type:  defect                               |         Status:
                                                 |  needs_review
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  0.4.2.x-final
Component:  Core Tor/Tor                         |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  029-backport 035-backport            |  Actual Points:  .1
  040-backport 041-backport 042-should?          |
Parent ID:                                       |         Points:
 Reviewer:                                       |        Sponsor:
-------------------------------------------------+-------------------------

Comment (by nickm):

 The plot grows thicker.  On both debian and fedora, this command line
 gives a warning but returns success:
 {{{
 gcc -Wextra-semi -Werror -c example.c && echo ok
 }}}
 but this one fails:
 {{{
 gcc -Werror -Wextra-semi -c example.c && echo ok
 }}}

 Note that the only difference is the ordering of the `-Werror` and
 `-Wextra-semi` options.

 Let's look at our config.log file. On debian the command line that passes
 is:
 > gcc -c -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-
 all -Wstack-protector --param ssp-buffer-size=1 -fPIE -fasynchronous-
 unwind-tables -Wall -fno-strict-aliasing -Waddress -Warray-bounds -Wdate-
 time -Wdouble-promotion -Wduplicate-decl-specifier -Wduplicated-cond
 -Wextra -pedantic -Werror -Wextra-semi  conftest.c >&5

 And on Fedora the one that fails is:
 > gcc -c -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-
 all -Wstack-protector --param ssp-buffer-size=1 -fPIE -fasynchronous-
 unwind-tables -Wall -fno-strict-aliasing -Waddress -Warray-bounds -Wdate-
 time -Wdouble-promotion -Wduplicate-decl-specifier -Wduplicated-cond
 -Wextra -pedantic -Werror -Wextra-semi  conftest.c >&5

 Those look identical to me.

 Moreover, when I run them on a fedora desktop and on a debian bullseye
 schroot, I (correctly) get a failing exit code from both.

 At this point, I am flummoxed.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/31769#comment:6>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list