COMP: reduce compiler warnings for gcc-7

- ignore implicit-fallthrough for ragel generated code.

- add -Wno-deprecated-declarations for c++LESSWARN.
  These principally associated with older CGAL versions and their use
  of particular mpfr routines.
This commit is contained in:
Mark Olesen
2018-07-24 09:29:01 +02:00
parent fe808e24e7
commit 94a89d530a
5 changed files with 235 additions and 222 deletions

File diff suppressed because it is too large Load Diff

View File

@ -33,6 +33,9 @@ Description
#include "STLReader.H" #include "STLReader.H"
#include "OSspecific.H" #include "OSspecific.H"
// Ragel switch/case logic may have several implicit fallthroughs
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
// https://en.wikipedia.org/wiki/STL_%28file_format%29#ASCII_STL // https://en.wikipedia.org/wiki/STL_%28file_format%29#ASCII_STL
// //
// Format // Format

View File

@ -14,4 +14,5 @@ c++WARN = \
c++LESSWARN = \ c++LESSWARN = \
-Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds \ -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds \
-Wno-deprecated-declarations \
-fpermissive -fpermissive

View File

@ -73,6 +73,9 @@ Note
#include <unordered_set> #include <unordered_set>
#include <vector> #include <vector>
// Ragel switchs may have several implicit fallthroughs
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
// Length of the input read buffer // Length of the input read buffer
#define INBUFLEN 16384 #define INBUFLEN 16384
@ -309,7 +312,7 @@ namespace Files
// Can use 'variable p xxx;' etc to change these names // Can use 'variable p xxx;' etc to change these names
#line 334 "wmkdepend.rl" #line 337 "wmkdepend.rl"
@ -318,14 +321,14 @@ namespace Files
// //
#line 322 "wmkdepend.cpp" #line 325 "wmkdepend.cpp"
static const int wmkdep_start = 21; static const int wmkdep_start = 21;
static const int wmkdep_error = 0; static const int wmkdep_error = 0;
static const int wmkdep_en_main = 21; static const int wmkdep_en_main = 21;
#line 342 "wmkdepend.rl" #line 345 "wmkdepend.rl"
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@ -348,7 +351,7 @@ void processFile(const std::string& fileName)
int act, cs; int act, cs;
#line 352 "wmkdepend.cpp" #line 355 "wmkdepend.cpp"
{ {
cs = wmkdep_start; cs = wmkdep_start;
ts = 0; ts = 0;
@ -356,7 +359,7 @@ void processFile(const std::string& fileName)
act = 0; act = 0;
} }
#line 363 "wmkdepend.rl" #line 366 "wmkdepend.rl"
/* ^^^ FSM initialization here ^^^ */; /* ^^^ FSM initialization here ^^^ */;
// Local token start // Local token start
@ -401,7 +404,7 @@ void processFile(const std::string& fileName)
} }
#line 405 "wmkdepend.cpp" #line 408 "wmkdepend.cpp"
{ {
if ( p == pe ) if ( p == pe )
goto _test_eof; goto _test_eof;
@ -420,35 +423,35 @@ tr0:
} }
goto st21; goto st21;
tr2: tr2:
#line 332 "wmkdepend.rl" #line 335 "wmkdepend.rl"
{te = p+1;} {te = p+1;}
goto st21; goto st21;
tr17: tr17:
#line 332 "wmkdepend.rl" #line 335 "wmkdepend.rl"
{{p = ((te))-1;}} {{p = ((te))-1;}}
goto st21; goto st21;
tr21: tr21:
#line 327 "wmkdepend.rl" #line 330 "wmkdepend.rl"
{te = p+1;} {te = p+1;}
goto st21; goto st21;
tr29: tr29:
#line 330 "wmkdepend.rl" #line 333 "wmkdepend.rl"
{te = p+1;} {te = p+1;}
goto st21; goto st21;
tr31: tr31:
#line 329 "wmkdepend.rl" #line 332 "wmkdepend.rl"
{te = p+1;} {te = p+1;}
goto st21; goto st21;
tr36: tr36:
#line 324 "wmkdepend.rl" #line 327 "wmkdepend.rl"
{te = p;p--;} {te = p;p--;}
goto st21; goto st21;
tr37: tr37:
#line 332 "wmkdepend.rl" #line 335 "wmkdepend.rl"
{te = p;p--;} {te = p;p--;}
goto st21; goto st21;
tr38: tr38:
#line 330 "wmkdepend.rl" #line 333 "wmkdepend.rl"
{te = p;p--;} {te = p;p--;}
goto st21; goto st21;
st21: st21:
@ -461,7 +464,7 @@ st21:
case 21: case 21:
#line 1 "NONE" #line 1 "NONE"
{ts = p;} {ts = p;}
#line 465 "wmkdepend.cpp" #line 468 "wmkdepend.cpp"
switch( (*p) ) { switch( (*p) ) {
case 10: goto st23; case 10: goto st23;
case 11: goto tr34; case 11: goto tr34;
@ -482,14 +485,14 @@ case 1:
tr32: tr32:
#line 1 "NONE" #line 1 "NONE"
{te = p+1;} {te = p+1;}
#line 324 "wmkdepend.rl" #line 327 "wmkdepend.rl"
{act = 1;} {act = 1;}
goto st22; goto st22;
st22: st22:
if ( ++p == pe ) if ( ++p == pe )
goto _test_eof22; goto _test_eof22;
case 22: case 22:
#line 493 "wmkdepend.cpp" #line 496 "wmkdepend.cpp"
switch( (*p) ) { switch( (*p) ) {
case 10: goto st23; case 10: goto st23;
case 11: goto tr34; case 11: goto tr34;
@ -511,14 +514,14 @@ case 23:
tr34: tr34:
#line 1 "NONE" #line 1 "NONE"
{te = p+1;} {te = p+1;}
#line 324 "wmkdepend.rl" #line 327 "wmkdepend.rl"
{act = 1;} {act = 1;}
goto st24; goto st24;
st24: st24:
if ( ++p == pe ) if ( ++p == pe )
goto _test_eof24; goto _test_eof24;
case 24: case 24:
#line 522 "wmkdepend.cpp" #line 525 "wmkdepend.cpp"
switch( (*p) ) { switch( (*p) ) {
case 10: goto st23; case 10: goto st23;
case 32: goto tr34; case 32: goto tr34;
@ -616,14 +619,14 @@ case 10:
} }
goto tr12; goto tr12;
tr12: tr12:
#line 312 "wmkdepend.rl" #line 315 "wmkdepend.rl"
{ tok = p; /* Local token start */ } { tok = p; /* Local token start */ }
goto st11; goto st11;
st11: st11:
if ( ++p == pe ) if ( ++p == pe )
goto _test_eof11; goto _test_eof11;
case 11: case 11:
#line 627 "wmkdepend.cpp" #line 630 "wmkdepend.cpp"
switch( (*p) ) { switch( (*p) ) {
case 10: goto tr15; case 10: goto tr15;
case 34: goto tr16; case 34: goto tr16;
@ -632,7 +635,7 @@ case 11:
tr13: tr13:
#line 1 "NONE" #line 1 "NONE"
{te = p+1;} {te = p+1;}
#line 312 "wmkdepend.rl" #line 315 "wmkdepend.rl"
{ tok = p; /* Local token start */ } { tok = p; /* Local token start */ }
goto st25; goto st25;
tr15: tr15:
@ -643,7 +646,7 @@ st25:
if ( ++p == pe ) if ( ++p == pe )
goto _test_eof25; goto _test_eof25;
case 25: case 25:
#line 647 "wmkdepend.cpp" #line 650 "wmkdepend.cpp"
if ( (*p) == 34 ) if ( (*p) == 34 )
goto tr19; goto tr19;
goto st12; goto st12;
@ -655,26 +658,26 @@ case 12:
goto tr19; goto tr19;
goto st12; goto st12;
tr19: tr19:
#line 313 "wmkdepend.rl" #line 316 "wmkdepend.rl"
{ processFile(std::string(tok, (p - tok))); } { processFile(std::string(tok, (p - tok))); }
goto st13; goto st13;
st13: st13:
if ( ++p == pe ) if ( ++p == pe )
goto _test_eof13; goto _test_eof13;
case 13: case 13:
#line 666 "wmkdepend.cpp" #line 669 "wmkdepend.cpp"
if ( (*p) == 10 ) if ( (*p) == 10 )
goto tr21; goto tr21;
goto st13; goto st13;
tr16: tr16:
#line 313 "wmkdepend.rl" #line 316 "wmkdepend.rl"
{ processFile(std::string(tok, (p - tok))); } { processFile(std::string(tok, (p - tok))); }
goto st14; goto st14;
st14: st14:
if ( ++p == pe ) if ( ++p == pe )
goto _test_eof14; goto _test_eof14;
case 14: case 14:
#line 678 "wmkdepend.cpp" #line 681 "wmkdepend.cpp"
if ( (*p) == 10 ) if ( (*p) == 10 )
goto tr21; goto tr21;
goto st14; goto st14;
@ -705,7 +708,7 @@ st26:
if ( ++p == pe ) if ( ++p == pe )
goto _test_eof26; goto _test_eof26;
case 26: case 26:
#line 709 "wmkdepend.cpp" #line 712 "wmkdepend.cpp"
if ( (*p) == 42 ) if ( (*p) == 42 )
goto st18; goto st18;
goto st17; goto st17;
@ -738,14 +741,14 @@ case 19:
tr30: tr30:
#line 1 "NONE" #line 1 "NONE"
{te = p+1;} {te = p+1;}
#line 330 "wmkdepend.rl" #line 333 "wmkdepend.rl"
{act = 4;} {act = 4;}
goto st27; goto st27;
st27: st27:
if ( ++p == pe ) if ( ++p == pe )
goto _test_eof27; goto _test_eof27;
case 27: case 27:
#line 749 "wmkdepend.cpp" #line 752 "wmkdepend.cpp"
if ( (*p) == 10 ) if ( (*p) == 10 )
goto tr2; goto tr2;
goto st1; goto st1;
@ -820,7 +823,7 @@ cs = 0;
_out: {} _out: {}
} }
#line 406 "wmkdepend.rl" #line 409 "wmkdepend.rl"
/* ^^^ FSM execution here ^^^ */; /* ^^^ FSM execution here ^^^ */;
if (0 == cs) if (0 == cs)

View File

@ -71,6 +71,9 @@ Note
#include <unordered_set> #include <unordered_set>
#include <vector> #include <vector>
// Ragel switchs may have several implicit fallthroughs
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
// Length of the input read buffer // Length of the input read buffer
#define INBUFLEN 16384 #define INBUFLEN 16384