[tor-bugs] #27900 [Core Tor/Tor]: Please establish which C standard tor code complies with

Tor Bug Tracker & Wiki blackhole at torproject.org
Sat Sep 29 02:20:46 UTC 2018


#27900: Please establish which C standard tor code complies with
--------------------------+------------------------------------
 Reporter:  yurivict271   |          Owner:  (none)
     Type:  defect        |         Status:  new
 Priority:  Medium        |      Milestone:  Tor: 0.3.5.x-final
Component:  Core Tor/Tor  |        Version:
 Severity:  Normal        |     Resolution:
 Keywords:                |  Actual Points:
Parent ID:                |         Points:
 Reviewer:                |        Sponsor:
--------------------------+------------------------------------

Comment (by yurivict271):

 Morover, when I add {{{-std=c99}}}, compilation breaks:
 {{{
 src/common/di_ops.c:158:5: warning: implicit declaration of function
 'typeof' is invalid in C99 [-Wimplicit-function-declaration]
     tor_free(victim);
     ^
 ./src/common/util.h:90:5: note: expanded from macro 'tor_free'
     typeof(&(p)) tor_free__tmpvar = &(p);                      \
     ^
 src/common/di_ops.c:158:5: warning: this function declaration is not a
 prototype [-Wstrict-prototypes]
 ./src/common/util.h:90:5: note: expanded from macro 'tor_free'
     typeof(&(p)) tor_free__tmpvar = &(p);                      \
     ^
 src/common/di_ops.c:158:5: error: expected ';' after expression
 ./src/common/util.h:90:18: note: expanded from macro 'tor_free'
     typeof(&(p)) tor_free__tmpvar = &(p);                      \
                  ^
 src/common/di_ops.c:158:5: error: use of undeclared identifier
 'tor_free__tmpvar'
 ./src/common/util.h:90:18: note: expanded from macro 'tor_free'
     typeof(&(p)) tor_free__tmpvar = &(p);                      \
                  ^
 }}}

 So it is something else, not {{{c99}}}.

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


More information about the tor-bugs mailing list