Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#506 closed enhancement (fixed)

svndigest does not build with subversion 1.7

Reported by: Peter Johansson Owned by: Peter Johansson
Priority: critical Milestone: svndigest 0.9.4
Component: build Version: trunk
Keywords: Cc:

Description

This is a spin-off from

http://dev.thep.lu.se/svndigest/ticket/488#comment:6

Regardless of direction of ticket #488 I want to fix this build problem asap, i.e., fix it in stable, release, and merge fix into trunk. I want this to work automagically so ./configure; make works without tweaking from user.

To accomplish this we need to turn off -pedantic when subversion 1.7 is used. I'm thinking of a solution in which we set -pedantic early just as now, then when we have confirmed that we can find svn headers we check compiling against svn_wc.h and if that is not successful we remove -pedantic from CXXFLAGS.

Change History (7)

comment:1 Changed 9 years ago by Jari Häkkinen

Reading this thread in the svndigest mailing list makes me wonder. Shouldn't -pedantic accept the trailing komma? Obviously it is allowed in the standard ... of course, pedantic does not have to settle to check allowed syntax.

So, -pedantic is not a part of debugging and seems to be too restrictive. Maybe it should be an option selected by the developer and off by default?

comment:2 Changed 9 years ago by Peter Johansson

Are you saying turn on -pedantic in --enable-debug and not otherwise?

That's a much more straightforward change than the one I sketched on.

comment:3 in reply to:  1 Changed 9 years ago by Peter Johansson

Replying to jari:

Reading this thread in the svndigest mailing list makes me wonder. Shouldn't -pedantic accept the trailing komma?

Well it seems trailing comma is OK in C99 but illegal in C89 and C++98 [1]. Naively it makes sense that -pedantic checks with C++98 since we use gcc in C++ mode. The subversion header is obviously written in C and I'm thinking this should be clear to GCC as there is an extern C declaration. Should GCC switch pedantic to check against C99 in this case?

[1] http://bytes.com/topic/c/answers/805031-trailing-commas-end-enumeration

comment:4 Changed 9 years ago by Jari Häkkinen

Isn't this a bug in GCC? Shouldn't g++ accept the commas since it is legal C? Can one expect a C++ compiler to follow a C standard in extern C clauses? Of course, here we cannot expect a C++98 standard to utilize C99 (a future standard) so I suppose the g++ does a proper job. So, what about the coming C++ standard? Whatever, go for the straightforward solution.

comment:5 Changed 9 years ago by Peter Johansson

(In [1401]) turn on -pedantic only in --enable-debug mode. refs #506

comment:6 Changed 9 years ago by Peter Johansson

Resolution: fixed
Status: newclosed

comment:7 Changed 9 years ago by Peter Johansson

(In [1416]) in enable-debug check whether svn_wc.h compiles with -pedantic, if not remove -pedantic from CXXFLAGS. refs #506

Note: See TracTickets for help on using tickets.