Am Sonntag, 14. Dezember 2014, 18:20:13 schrieb Pádraig Brady: > On 14/12/14 17:03, Tim Rühsen wrote: > > Hi, > > > > libgnutls fails to compile here due to an issue with gnulib. > > > > The maintainer (Nikos Mavrogiannopoulos <n...@gnutls.org>) asked me to > > report it here. > > > > > > The declaration and definition of yylex() function differ (and maybe I get > > an error because of gcc's -Wstrict-prototypes, but did not verify it). > > > > This patch fixes it for me: > > > > diff --git a/src/gl/parse-datetime.y b/src/gl/parse-datetime.y > > index 52e6a0c..72d6c38 100644 > > --- a/src/gl/parse-datetime.y > > +++ b/src/gl/parse-datetime.y > > @@ -1031,7 +1031,7 @@ lookup_word (parser_control const *pc, char *word) > > > > } > > > > static int > > > > -yylex (YYSTYPE *lvalp, parser_control *pc) > > +yylex (union YYSTYPE *lvalp, parser_control *pc) > > > > { > > > > unsigned char c; > > size_t count; > > > > Regards, Tim > > What version of compiler and what compile flags are you using?
Thanks for having a look, Pádraig. I am on Debian unstable. $ gcc --version gcc (Debian 4.9.2-7) 4.9.2 After some testing I have to admit that I used 'byacc' instead of 'bison'. That makes the difference. My CFLAGS are -std=gnu99 -g -fPIC -Wall -Wstrict-prototypes -Wold-style-definition -Wmissing- prototypes -Wwrite-strings -Wformat=2 -Wformat -Wformat-security -Wsign- compare -Wextra -D_FORTIFY_SOURCE=2 -Wcast-align -O2 -Wlogical-op -Wmissing- declarations > Also would it be better to remove the "union" from the declaration. > I.E. not have "union" in any of the declarations as there are > many uses of YYSTYPE in that file. Feel free to do it either way. I'am not sure if 'byacc' is an alternative to 'bison', but I guess yes. Now that I changed to bison, parse-datetime.c compiles without issue. Regards, Tim
signature.asc
Description: This is a digitally signed message part.