Modify examples to probe more warnings and supress warnings with G++

This commit is contained in:
anonymous 2022-05-23 17:37:14 +02:00
parent 7a58367433
commit c160586bf0
Signed by: moniere
GPG key ID: 188DD5B072181C0F
3 changed files with 24 additions and 5 deletions

View file

@ -13,8 +13,11 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# #
CXXFLAGS= -std=c++14 -Wall -O3
a.out: test.cpp a.out: test.cpp
g++ -I../../include test.cpp g++ -I../../include $(CXXFLAGS) test.cpp
./a.out ./a.out
.PHONY: clean .PHONY: clean

View file

@ -15,22 +15,25 @@
# limitations under the License. # limitations under the License.
# #
CXXFLAGS= -std=c++14 -Wall -O3
CXX=g++
all: a.out ex1.out ex2.out ex3.out all: a.out ex1.out ex2.out ex3.out
a.out: test.cpp a.out: test.cpp
g++ -I../../include test.cpp -std=c++14 -o a.out $(CXX) -I../../include test.cpp $(CXXFLAGS) -o a.out
./a.out ./a.out
ex1.out: ap_int_manip_ex.cpp ex1.out: ap_int_manip_ex.cpp
g++ -I../../include ap_int_manip_ex.cpp -std=c++14 -o ex1.out $(CXX) -I../../include ap_int_manip_ex.cpp $(CXXFLAGS) -o ex1.out
./ex1.out ./ex1.out
ex2.out: ap_int_manip_ex2.cpp ex2.out: ap_int_manip_ex2.cpp
g++ -I../../include ap_int_manip_ex2.cpp -std=c++14 -o ex2.out $(CXX) -I../../include ap_int_manip_ex2.cpp $(CXXFLAGS) -o ex2.out
./ex2.out ./ex2.out
ex3.out: ap_int_manip_ex3.cpp ex3.out: ap_int_manip_ex3.cpp
g++ -I../../include ap_int_manip_ex3.cpp -std=c++14 -o ex3.out $(CXX) -I../../include ap_int_manip_ex3.cpp $(CXXFLAGS) -o ex3.out
./ex3.out ./ex3.out
.PHONY: clean .PHONY: clean

View file

@ -24,6 +24,14 @@
#error "etc/ap_private.h cannot be included directly." #error "etc/ap_private.h cannot be included directly."
#endif #endif
#if defined( __clang__ )
#elif defined ( __GNUC__ )
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#pragma GCC diagnostic ignored "-Wint-in-bool-context"
#pragma GCC diagnostic ignored "-Wuninitialized"
#endif
// forward declarations // forward declarations
//template <int _AP_W, bool _AP_S, bool _AP_C = _AP_W <= 64> //template <int _AP_W, bool _AP_S, bool _AP_C = _AP_W <= 64>
//class ap_private; // moved to ap_common.h //class ap_private; // moved to ap_common.h
@ -7202,6 +7210,11 @@ REF_BIN_OP(<<, arg1)
// when both sides are signed. // when both sides are signed.
//************************************************************************ //************************************************************************
#if defined( __clang__ )
#elif defined ( __GNUC__ )
#pragma GCC diagnostic pop
#endif
#endif // ifndef __AP_PRIVATE_H__ #endif // ifndef __AP_PRIVATE_H__
// -*- cpp -*- // -*- cpp -*-