{
const char *cs;
- if (producer != NULL && startswith (producer, "GNU "))
+ if (producer != nullptr && startswith (producer, "GNU "))
{
int maj, min;
- if (major == NULL)
+ if (major == nullptr)
major = &maj;
- if (minor == NULL)
+ if (minor == nullptr)
minor = &min;
/* Skip GNU. */
bool
producer_is_llvm (const char *producer)
{
- return ((producer != NULL) && (startswith (producer, "clang ")
- || startswith (producer, " F90 Flang ")));
+ return ((producer != nullptr)
+ && (startswith (producer, "clang ")
+ || startswith (producer, " F90 Flang ")));
}
/* See producer.h. */
"ARM C/C++ Compiler, RVCT"
};
- if (producer == NULL)
+ if (producer == nullptr)
return false;
for (const char *ident : arm_idents)
{
static const char gnu[] = "GNU C 4.7.2";
- SELF_CHECK (!producer_is_icc (gnu, NULL, NULL));
+ SELF_CHECK (!producer_is_icc (gnu, nullptr, nullptr));
int major = 0, minor = 0;
SELF_CHECK (producer_is_gcc (gnu, &major, &minor)
{
static const char gnu_exp[] = "GNU C++14 5.0.0 20150123 (experimental)";
int major = 0, minor = 0;
- SELF_CHECK (!producer_is_icc (gnu_exp, NULL, NULL));
+ SELF_CHECK (!producer_is_icc (gnu_exp, nullptr, nullptr));
SELF_CHECK (producer_is_gcc (gnu_exp, &major, &minor)
&& major == 5 && minor == 0);
}
{
static const char clang_llvm_exp[] = "clang version 12.0.0 (CLANG: bld#8)";
int major = 0, minor = 0;
- SELF_CHECK (!producer_is_icc (clang_llvm_exp, NULL, NULL));
+ SELF_CHECK (!producer_is_icc (clang_llvm_exp, nullptr, nullptr));
SELF_CHECK (!producer_is_gcc (clang_llvm_exp, &major, &minor));
SELF_CHECK (producer_is_llvm (clang_llvm_exp));
}
{
static const char flang_llvm_exp[] = " F90 Flang - 1.5 2017-05-01";
int major = 0, minor = 0;
- SELF_CHECK (!producer_is_icc (flang_llvm_exp, NULL, NULL));
+ SELF_CHECK (!producer_is_icc (flang_llvm_exp, nullptr, nullptr));
SELF_CHECK (!producer_is_gcc (flang_llvm_exp, &major, &minor));
SELF_CHECK (producer_is_llvm (flang_llvm_exp));
}
extern int producer_is_gcc_ge_4 (const char *producer);
/* Return true if the given PRODUCER string is GCC and sets the MAJOR
- and MINOR versions when not NULL. Return false if the given PRODUCER
- is NULL or it isn't GCC. */
+ and MINOR versions when not nullptr. Return false if the given PRODUCER
+ is nullptr or it isn't GCC. */
extern bool producer_is_gcc (const char *producer, int *major, int *minor);
/* Return true if the given PRODUCER string is GAS and sets the MAJOR
- and MINOR versions when not NULL. Returns false if the given PRODUCER
- is NULL or it isn't GAS. */
+ and MINOR versions when not nullptr. Returns false if the given PRODUCER
+ is nullptr or it isn't GAS. */
bool producer_is_gas (const char *producer, int *major, int *minor);
/* Check for Intel compilers >= 19.0. */
extern bool producer_is_icc_ge_19 (const char *producer);
/* Returns true if the given PRODUCER string is Intel or false
- otherwise. Sets the MAJOR and MINOR versions when not NULL. */
+ otherwise. Sets the MAJOR and MINOR versions when not nullptr. */
extern bool producer_is_icc (const char *producer, int *major, int *minor);
/* Returns true if the given PRODUCER string is LLVM (clang/flang) or
extern bool producer_is_llvm (const char *producer);
/* Returns true if the given PRODUCER string is clang, false otherwise.
- Sets MAJOR and MINOR accordingly, if not NULL. */
+ Sets MAJOR and MINOR accordingly, if not nullptr. */
extern bool producer_is_clang (const char *producer, int *major, int *minor);
/* Return true if the supplied producer string matches the ARM