Commit 8f852d02 authored by ZIMMERMANN Paul's avatar ZIMMERMANN Paul Committed by Emmanuel Thomé

disable -Wimplicit-fallthrough only at specific places

parent 8b82146c
......@@ -115,11 +115,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#ifdef __GNUC__
#pragma GCC diagnostic error "-Wextra"
#pragma GCC diagnostic error "-Wall"
#if __GNUC__ >= 7
/* there is an implicit and wanted fallthrough in polyselect_str.c
around lines 514-518, and in sieve/ecm/ecm.c around line 1105 */
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
#endif
#endif
#include "cado_config.h"
......
......@@ -15,11 +15,7 @@ typedef struct {
typedef mpfq_2_field_struct mpfq_2_field[1];
typedef mpfq_2_field_struct * mpfq_2_dst_field;
#if GNUC_VERSION(4,3,0)
#warning "Your GCC version is buggy. Binary fields may fail randomly"
#endif
#if GNUC_VERSION(4,3,1)
#if GNUC_VERSION(4,3,0) || GNUC_VERSION(4,3,1)
#warning "Your GCC version is buggy. Binary fields may fail randomly"
#endif
......
......@@ -3114,6 +3114,9 @@ static inline void matmul_bucket_mul_loop(struct matmul_bucket_data_s * mm, abel
for(hdr = mm->headers.begin() ; hdr != mm->headers.end() ; hdr++) {
unsigned int hidx = hdr - mm->headers.begin();
mm->slice_timings[hidx].t -= wct_seconds();
#if __GNUC__ >= 7
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
#endif
switch(hdr->t) {
case SLICE_TYPE_SMALL2:
matmul_bucket_mul_small2(mm, &*hdr, dst, src, d, pos);
......
......@@ -1005,6 +1005,9 @@ shash_find_collision (shash_t H)
SHASH_RESEARCH(Th4, i4); SHASH_TH_I(Th4, i4, 4);
Hj += 5;
}
#if __GNUC__ >= 7
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
#endif
switch (Hj - Hjm) { /* no break: it's NOT an error! */
case 0: SHASH_RESEARCH(Th4, i4); no_break();
case 1: SHASH_RESEARCH(Th3, i3); no_break();
......
......@@ -293,6 +293,9 @@ static inline __m128i _mm_lg2abs(__m128d *i, const __m128d add, const __m128d sc
static inline double compute_f (const unsigned int d, const double *u, const double h) {
size_t k = (size_t) d;
double f = u[k];
#if __GNUC__ >= 7
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
#endif
switch (k) {
default: do { f = f * h + u[--k]; } while (k > 9);
case 9: f = f * h + u[8]; no_break();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment