diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2017-03-06 21:42:07 +0000 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2017-03-06 21:42:07 +0000 |
commit | 9c50b4cb200832ae29ebb3024dde16674b001347 (patch) | |
tree | e60fca8882a2a5ac0da2ac2a1703a7b15a43a028 | |
parent | 4e058918ed29724f9bbda6ebce32323478a71e2a (diff) | |
download | Compiler-9c50b4cb200832ae29ebb3024dde16674b001347.tar.gz Compiler-9c50b4cb200832ae29ebb3024dde16674b001347.zip |
Removing declaration of fileno
-rw-r--r-- | c_compiler/src/c_lexer.flex | 2 | ||||
-rw-r--r-- | c_parser/src/c_lexer.flex | 2 | ||||
-rw-r--r-- | 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" @@ -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 |