From 9c50b4cb200832ae29ebb3024dde16674b001347 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Mon, 6 Mar 2017 21:42:07 +0000 Subject: Removing declaration of fileno --- c_compiler/src/c_lexer.flex | 2 -- c_parser/src/c_lexer.flex | 2 -- makefile | 18 ++++++++++++++---- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/c_compiler/src/c_lexer.flex b/c_compiler/src/c_lexer.flex index 7690d71..b225522 100644 --- a/c_compiler/src/c_lexer.flex +++ b/c_compiler/src/c_lexer.flex @@ -1,8 +1,6 @@ %option noyywrap %{ -// Avoid error "error: fileno was not declared in this scope" -extern "C" int fileno(FILE *stream); #include "c_parser.tab.hpp" diff --git a/c_parser/src/c_lexer.flex b/c_parser/src/c_lexer.flex index c8ca90a..91b35a9 100644 --- a/c_parser/src/c_lexer.flex +++ b/c_parser/src/c_lexer.flex @@ -1,8 +1,6 @@ %option noyywrap %{ -// Avoid error "error: fileno was not declared in this scope" -extern "C" int fileno(FILE *stream); #include "c_parser.tab.hpp" diff --git a/makefile b/makefile index 0702fb5..760d388 100644 --- a/makefile +++ b/makefile @@ -1,7 +1,7 @@ CC := g++ # this is the main compiler # CC := clang --analyze # and comment out the linker last line -CFLAGS := -g -Wall -Wextra -Wpedantic -std=c++14 +CFLAGS := -g -Wall -Wextra -Wpedantic -std=c++11 LEXINC := -Ic_lexer/include LEXBUILDDIR := c_lexer/build @@ -101,8 +101,18 @@ $(COMPSRCDIR)/c_parser.tab.cpp $(COMPSRCDIR)/c_parser.tab.hpp : $(COMPSRCDIR)/c_ clean : @echo "Cleaning..." - @echo " rm -r $(LEXBUILDDIR) bin $(LEXSRCDIR)/c_lexer.yy.cpp"; rm -r bin $(LEXBUILDDIR) $(LEXSRCDIR)/c_lexer.yy.cpp $(PARBUILDDIR) $(PARSRCDIR)/c_lexer.yy.cpp $(PARSRCDIR)/c_parser.tab.cpp $(PARSRCDIR)/c_parser.tab.hpp $(PARSRCDIR)/c_parser.output + rm -rf bin + rm -rf $(LEXBUILDDIR) + rm -f $(LEXSRCDIR)/c_lexer.yy.cpp + rm -rf $(PARBUILDDIR) + rm -f $(PARSRCDIR)/c_lexer.yy.cpp + rm -f $(PARSRCDIR)/c_parser.tab.cpp + rm -f $(PARSRCDIR)/c_parser.tab.hpp + rm -f $(PARSRCDIR)/c_parser.output + rm -rf $(COMPBUILDDIR) + rm -f $(COMPSRCDIR)/c_lexer.yy.cpp + rm -f $(COMPSRCDIR)/c_parser.tab.cpp + rm -f $(COMPSRCDIR)/c_parser.tab.hpp + rm -f $(COMPSRCDIR)/c_parser.output .PHONY : clean - -.PRECIOUS : $(LEXSRCDIR)/%.yy.cpp $(PARSRCDIR)/%.yy.cpp $(PARSRCDIR)/%.tab.cpp $(PARSRCDIR)/%.tab.hpp -- cgit