Changes in / [52e2e3f:ebf5689]
- Location:
- src
- Files:
-
- 4 edited
-
SymTab/Validate.cc (modified) (1 diff)
-
SynTree/Statement.cc (modified) (1 diff)
-
tests/Makefile.am (modified) (3 diffs)
-
tests/Makefile.in (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Validate.cc
r52e2e3f rebf5689 483 483 484 484 void ReturnChecker::visit( ReturnStmt * returnStmt ) { 485 // Previously this also checked for the existence of an expr paired with no return values on486 // the function return type. This is incorrect, since you can have an expression attached to487 // a return statement in a void-returning function in C. The expression is treated as if it488 // were cast to void.489 485 if ( returnStmt->get_expr() == NULL && returnVals.size() != 0 ) { 490 486 throw SemanticError( "Non-void function returns no values: " , returnStmt ); 487 } else if ( returnStmt->get_expr() != NULL && returnVals.size() == 0 ) { 488 throw SemanticError( "void function returns values: " , returnStmt ); 491 489 } 492 490 } -
src/SynTree/Statement.cc
r52e2e3f rebf5689 399 399 } 400 400 401 ImplicitCtorDtorStmt::ImplicitCtorDtorStmt( const ImplicitCtorDtorStmt & other ) : Statement( other ), callStmt( maybeClone( other.callStmt )) {401 ImplicitCtorDtorStmt::ImplicitCtorDtorStmt( const ImplicitCtorDtorStmt & other ) : Statement( other ), callStmt( other.callStmt ) { 402 402 } 403 403 404 404 ImplicitCtorDtorStmt::~ImplicitCtorDtorStmt() { 405 delete callStmt;406 405 } 407 406 -
src/tests/Makefile.am
r52e2e3f rebf5689 20 20 21 21 .PHONY : list 22 EXTRA_PROGRAMS = fstream_test vector_test avl_test constant0-1DP constant0-1ND constant0-1NDDP # build but do not install22 EXTRA_PROGRAMS = fstream_test vector_test avl_test Constant0-1DP Constant0-1ND Constant0-1NDDP # build but do not install 23 23 24 24 fstream_test_SOURCES = fstream_test.c … … 27 27 28 28 all-local : 29 python test.py vector_test avl_test operators numericConstants expression enum asmName array typeof cast29 python test.py vector_test avl_test Operators NumericConstants Expression Enum AsmName Array Typeof Cast 30 30 31 31 all-tests : … … 38 38 python test.py --list 39 39 40 constant0-1DP : constant0-1.c40 Constant0-1DP : Constant0-1.c 41 41 ${CC} ${CFLAGS} -DDUPS ${<} -o ${@} 42 42 43 constant0-1ND : constant0-1.c43 Constant0-1ND : Constant0-1.c 44 44 ${CC} ${CFLAGS} -DNEWDECL ${<} -o ${@} 45 45 46 constant0-1NDDP : constant0-1.c46 Constant0-1NDDP : Constant0-1.c 47 47 ${CC} ${CFLAGS} -DNEWDECL -DDUPS ${<} -o ${@} -
src/tests/Makefile.in
r52e2e3f rebf5689 36 36 POST_UNINSTALL = : 37 37 EXTRA_PROGRAMS = fstream_test$(EXEEXT) vector_test$(EXEEXT) \ 38 avl_test$(EXEEXT) constant0-1DP$(EXEEXT) \39 constant0-1ND$(EXEEXT) constant0-1NDDP$(EXEEXT)38 avl_test$(EXEEXT) Constant0-1DP$(EXEEXT) \ 39 Constant0-1ND$(EXEEXT) Constant0-1NDDP$(EXEEXT) 40 40 subdir = src/tests 41 41 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in … … 48 48 CONFIG_CLEAN_FILES = 49 49 CONFIG_CLEAN_VPATH_FILES = 50 Constant0_1DP_SOURCES = Constant0-1DP.c 51 Constant0_1DP_OBJECTS = Constant0-1DP.$(OBJEXT) 52 Constant0_1DP_LDADD = $(LDADD) 53 Constant0_1ND_SOURCES = Constant0-1ND.c 54 Constant0_1ND_OBJECTS = Constant0-1ND.$(OBJEXT) 55 Constant0_1ND_LDADD = $(LDADD) 56 Constant0_1NDDP_SOURCES = Constant0-1NDDP.c 57 Constant0_1NDDP_OBJECTS = Constant0-1NDDP.$(OBJEXT) 58 Constant0_1NDDP_LDADD = $(LDADD) 50 59 am_avl_test_OBJECTS = avl_test.$(OBJEXT) avl0.$(OBJEXT) avl1.$(OBJEXT) \ 51 60 avl2.$(OBJEXT) avl3.$(OBJEXT) avl4.$(OBJEXT) \ … … 53 62 avl_test_OBJECTS = $(am_avl_test_OBJECTS) 54 63 avl_test_LDADD = $(LDADD) 55 constant0_1DP_SOURCES = constant0-1DP.c56 constant0_1DP_OBJECTS = constant0-1DP.$(OBJEXT)57 constant0_1DP_LDADD = $(LDADD)58 constant0_1ND_SOURCES = constant0-1ND.c59 constant0_1ND_OBJECTS = constant0-1ND.$(OBJEXT)60 constant0_1ND_LDADD = $(LDADD)61 constant0_1NDDP_SOURCES = constant0-1NDDP.c62 constant0_1NDDP_OBJECTS = constant0-1NDDP.$(OBJEXT)63 constant0_1NDDP_LDADD = $(LDADD)64 64 am_fstream_test_OBJECTS = fstream_test.$(OBJEXT) 65 65 fstream_test_OBJECTS = $(am_fstream_test_OBJECTS) … … 92 92 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) 93 93 am__v_GEN_0 = @echo " GEN " $@; 94 SOURCES = $(avl_test_SOURCES) constant0-1DP.c constant0-1ND.c \95 constant0-1NDDP.c$(fstream_test_SOURCES) \94 SOURCES = Constant0-1DP.c Constant0-1ND.c Constant0-1NDDP.c \ 95 $(avl_test_SOURCES) $(fstream_test_SOURCES) \ 96 96 $(vector_test_SOURCES) 97 DIST_SOURCES = $(avl_test_SOURCES) constant0-1DP.c constant0-1ND.c \98 constant0-1NDDP.c$(fstream_test_SOURCES) \97 DIST_SOURCES = Constant0-1DP.c Constant0-1ND.c Constant0-1NDDP.c \ 98 $(avl_test_SOURCES) $(fstream_test_SOURCES) \ 99 99 $(vector_test_SOURCES) 100 100 ETAGS = etags … … 261 261 -rm -f *.tab.c 262 262 263 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Constant0-1DP.Po@am__quote@ 264 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Constant0-1ND.Po@am__quote@ 265 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Constant0-1NDDP.Po@am__quote@ 263 266 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/array.Po@am__quote@ 264 267 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avl-private.Po@am__quote@ … … 269 272 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avl4.Po@am__quote@ 270 273 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avl_test.Po@am__quote@ 271 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/constant0-1DP.Po@am__quote@272 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/constant0-1ND.Po@am__quote@273 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/constant0-1NDDP.Po@am__quote@274 274 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstream_test.Po@am__quote@ 275 275 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector_int.Po@am__quote@ … … 634 634 635 635 all-local : 636 python test.py vector_test avl_test operators numericConstants expression enum asmName array typeof cast636 python test.py vector_test avl_test Operators NumericConstants Expression Enum AsmName Array Typeof Cast 637 637 638 638 all-tests : … … 645 645 python test.py --list 646 646 647 constant0-1DP : constant0-1.c647 Constant0-1DP : Constant0-1.c 648 648 ${CC} ${CFLAGS} -DDUPS ${<} -o ${@} 649 649 650 constant0-1ND : constant0-1.c650 Constant0-1ND : Constant0-1.c 651 651 ${CC} ${CFLAGS} -DNEWDECL ${<} -o ${@} 652 652 653 constant0-1NDDP : constant0-1.c653 Constant0-1NDDP : Constant0-1.c 654 654 ${CC} ${CFLAGS} -DNEWDECL -DDUPS ${<} -o ${@} 655 655
Note:
See TracChangeset
for help on using the changeset viewer.