• Home
  • Raw
  • Download

Lines Matching +full:gcc +full:- +full:8

1 /* -*- Mode: c; tab-width: 8; indent-tabs-mode: 1; c-basic-offset: 8; -*- */
38 #include "pcap/compiler-tests.h"
42 * Clang and GCC both support this way of putting pragmas into #defines.
44 * warning-suppressing pragmas differ between Clang and GCC, so we test
94 * Suppress signed-vs-unsigned comparison, narrowing, and unreachable
124 #elif PCAP_IS_AT_LEAST_CLANG_VERSION(2,8)
127 * ignored -Wxxx" and "clang diagnostic push/pop".
129 * Suppress -Wdocumentation warnings; GCC doesn't support -Wdocumentation,
130 * at least according to the GCC 7.3 documentation. Apparently, Flex
132 * -Wdocumentation.
136 PCAP_DO_PRAGMA(clang diagnostic ignored "-Wsign-compare") \
137 PCAP_DO_PRAGMA(clang diagnostic ignored "-Wdocumentation") \
138 PCAP_DO_PRAGMA(clang diagnostic ignored "-Wshorten-64-to-32") \
139 PCAP_DO_PRAGMA(clang diagnostic ignored "-Wmissing-noreturn") \
140 PCAP_DO_PRAGMA(clang diagnostic ignored "-Wunused-parameter") \
141 PCAP_DO_PRAGMA(clang diagnostic ignored "-Wunreachable-code")
150 PCAP_DO_PRAGMA(clang diagnostic ignored "-Wshorten-64-to-32")
160 PCAP_DO_PRAGMA(clang diagnostic ignored "-Wdeprecated-declarations")
165 * This is GCC 4.6 or later, or a compiler claiming to be that.
166 * We can use "GCC diagnostic ignored -Wxxx" (introduced in 4.2)
167 * and "GCC diagnostic push/pop" (introduced in 4.6).
170 PCAP_DO_PRAGMA(GCC diagnostic push) \
171 PCAP_DO_PRAGMA(GCC diagnostic ignored "-Wsign-compare") \
172 PCAP_DO_PRAGMA(GCC diagnostic ignored "-Wunused-parameter") \
173 PCAP_DO_PRAGMA(GCC diagnostic ignored "-Wunreachable-code")
175 PCAP_DO_PRAGMA(GCC diagnostic pop)
178 * GCC currently doesn't issue any narrowing warnings.
187 PCAP_DO_PRAGMA(GCC diagnostic push) \
188 PCAP_DO_PRAGMA(GCC diagnostic ignored "-Wdeprecated-declarations")
190 PCAP_DO_PRAGMA(GCC diagnostic pop)
193 * Neither Visual Studio, nor Clang 2.8 or later, nor GCC 4.6 or later
217 * So, if the compiler warns about that, we turn off -Wshadow warnings.
229 #elif PCAP_IS_AT_LEAST_CLANG_VERSION(2,8)
232 * ignored -Wxxx".
235 PCAP_DO_PRAGMA(clang diagnostic ignored "-Wshadow") \
236 PCAP_DO_PRAGMA(clang diagnostic ignored "-Wunreachable-code")
239 * This is GCC 4.6 or later, or a compiler claiming to be that.
240 * We can use "GCC diagnostic ignored -Wxxx" (introduced in 4.2,
244 PCAP_DO_PRAGMA(GCC diagnostic ignored "-Wshadow") \
245 PCAP_DO_PRAGMA(GCC diagnostic ignored "-Wunreachable-code")
248 * Neither Clang 2.8 or later nor GCC 4.6 or later or a compiler
273 #elif PCAP_IS_AT_LEAST_CLANG_VERSION(2,8)
276 * ignored -Wxxx".
279 PCAP_DO_PRAGMA(clang diagnostic ignored "-Wunreachable-code")
282 * This is GCC 4.6 or later, or a compiler claiming to be that.
283 * We can use "GCC diagnostic ignored -Wxxx" (introduced in 4.2,
287 PCAP_DO_PRAGMA(GCC diagnostic ignored "-Wunreachable-code")
290 * Neither Clang 2.8 or later nor GCC 4.6 or later or a compiler