From 177032852d5b4614112ca1ab3ef42d6b41824816 Mon Sep 17 00:00:00 2001 From: galik Date: Thu, 4 Feb 2016 00:56:56 +0000 Subject: [PATCH] prevent GCC warning/error when using -pedantic or -pedantic-errors flags --- date.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/date.h b/date.h index f933972..23bcb34 100644 --- a/date.h +++ b/date.h @@ -805,6 +805,12 @@ public: {} }; +#ifdef __GNUC__ +// GCC complains about __int128 with -pedantic or -pedantic-errors +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wpedantic" +#endif + template struct choose_trunc_type { @@ -826,6 +832,10 @@ struct choose_trunc_type >::type; }; +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif + template CONSTCD11 inline