From 7c4c728ddba1afa034d842723580e8ead8f71ac3 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sat, 28 Nov 2015 23:14:11 -0800 Subject: [PATCH] Remove flex/gperf hacks (this was fixed upstream). --- Cycript.l.in | 16 +++++++++++++--- Makefile.am | 4 ++-- Makefile.in | 4 ++-- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/Cycript.l.in b/Cycript.l.in index 0d0218f..fa27d9f 100644 --- a/Cycript.l.in +++ b/Cycript.l.in @@ -21,13 +21,20 @@ /* XXX: supposedly I will be screwed on very very long multi-line comments and need to replace these with a manual lexer. http://websrv.cs.fsu.edu/~engelen/courses/COP5621/Pr2.pdf */ -%{ - +%top{ #if defined(__clang__) #pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunknown-pragmas" +#pragma clang diagnostic ignored "-Wunused-variable" #pragma clang diagnostic ignored "-Wdeprecated-register" +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wsign-compare" +#pragma GCC diagnostic ignored "-Wunused-function" +#pragma GCC diagnostic ignored "-Wunused-variable" #endif +} + +%{ #define YYLTYPE CYLocation #include "Cycript.tab.hh" @@ -648,4 +655,7 @@ void CYDriver::PopCondition() { #if defined(__clang__) #pragma clang diagnostic pop +#else +// must not pop -Wunused-function +//#pragma GCC diagnostic pop #endif diff --git a/Makefile.am b/Makefile.am index 2cc8b2a..0519e2d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -71,7 +71,7 @@ Bridge.gperf: Bridge.def Bridge.sh CLEANFILES += Bridge.hpp Bridge.hpp: Bridge.gperf - $(GPERF) $< | $(SED) -e 's/defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__/0/' >$@ + $(GPERF) $< >$@ endif if CY_JAVA @@ -105,7 +105,7 @@ Cycript.l: Cycript.l.in UnicodeIDStart.l UnicodeIDContinue.l CLEANFILES += lex.cy.cpp lex.cy.cpp: Cycript.l - $(FLEX) -b -t $< | $(SED) -e 's/int yyl;/yy_size_t yyl;/;s/int yyleng_r;/yy_size_t yyleng_r;/;s/yyg =/yyg __attribute__((__unused__)) =/' >$@ + $(FLEX) -o $@ $< grep -F 'No backing up.' lex.backup >/dev/null Console.$(OBJEXT) Cycript.tab.lo Driver.lo Handler.lo Highlight.lo Library.lo lex.cy.lo: Cycript.tab.hh diff --git a/Makefile.in b/Makefile.in index 399da56..94714ce 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1325,13 +1325,13 @@ uninstall-am: uninstall-binPROGRAMS uninstall-libLTLIBRARIES @CY_EXECUTE_TRUE@Bridge.gperf: Bridge.def Bridge.sh @CY_EXECUTE_TRUE@ $(srcdir)/Bridge.sh $< >$@ @CY_EXECUTE_TRUE@Bridge.hpp: Bridge.gperf -@CY_EXECUTE_TRUE@ $(GPERF) $< | $(SED) -e 's/defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__/0/' >$@ +@CY_EXECUTE_TRUE@ $(GPERF) $< >$@ Cycript.yy: Cycript.yy.in $(srcdir)/Filter.sh $< >$@ $(filters) Cycript.l: Cycript.l.in UnicodeIDStart.l UnicodeIDContinue.l $(srcdir)/Filter.sh $< >$@ $(filters) lex.cy.cpp: Cycript.l - $(FLEX) -b -t $< | $(SED) -e 's/int yyl;/yy_size_t yyl;/;s/int yyleng_r;/yy_size_t yyleng_r;/;s/yyg =/yyg __attribute__((__unused__)) =/' >$@ + $(FLEX) -o $@ $< grep -F 'No backing up.' lex.backup >/dev/null Console.$(OBJEXT) Cycript.tab.lo Driver.lo Handler.lo Highlight.lo Library.lo lex.cy.lo: Cycript.tab.hh -- 2.47.2