d_attribute_nonnull d_attribute_noreturn d_attribute_pure \
d_attribute_unused d_attribute_warn_unused_result \
d_printf_format_null d_attribute_always_inline: \
- Myread Oldconfig cat cc ccflags rm Setvar contains i_stdlib run \
- i_inttypes
+ Myread Oldconfig cat cc ccflags rm Setvar compiler_warning \
+ i_stdlib run i_inttypes
?MAKE: -pick add $@ %<
?S:d_attribute_format:
?S: This variable conditionally defines HASATTRIBUTE_FORMAT, which
void my_special_printf(char* pat,...) __attribute__((__format__(__printf__,1,2)));
EOCP
if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
- if $contains 'warning' attrib.out >/dev/null 2>&1; then
+ if $compiler_warning attrib.out >/dev/null 2>&1; then
echo "Your C compiler doesn't support __attribute__((format))."
val="$undef"
else
if $cc $ccflags -o attrib attrib.c >attrib.out 2>&1 ; then
: run the executable in case it produces a run-time warning
if $run ./attrib >>attrib.out 2>&1; then
- if $contains 'warning' attrib.out >/dev/null 2>&1; then
+ if $compiler_warning attrib.out >/dev/null 2>&1; then
echo "Your C compiler doesn't allow __printf__ format to be null."
val="$undef"
else
char *go_get_some_memory( int how_many_bytes ) __attribute__((malloc));
EOCP
if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
- if $contains 'warning' attrib.out >/dev/null 2>&1; then
+ if $compiler_warning attrib.out >/dev/null 2>&1; then
echo "Your C compiler doesn't support __attribute__((malloc))."
val="$undef"
else
void do_something (char *some_pointer,...) __attribute__((nonnull(1)));
EOCP
if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
- if $contains 'warning' attrib.out >/dev/null 2>&1; then
+ if $compiler_warning attrib.out >/dev/null 2>&1; then
echo "Your C compiler doesn't support __attribute__((nonnull))."
val="$undef"
else
void fall_over_dead( void ) __attribute__((noreturn));
EOCP
if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
- if $contains 'warning' attrib.out >/dev/null 2>&1; then
+ if $compiler_warning attrib.out >/dev/null 2>&1; then
echo "Your C compiler doesn't support __attribute__((noreturn))."
val="$undef"
else
int square( int n ) __attribute__((pure));
EOCP
if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
- if $contains 'warning' attrib.out >/dev/null 2>&1; then
+ if $compiler_warning attrib.out >/dev/null 2>&1; then
echo "Your C compiler doesn't support __attribute__((pure))."
val="$undef"
else
int do_something( int dummy __attribute__((unused)), int n );
EOCP
if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
- if $contains 'warning' attrib.out >/dev/null 2>&1; then
+ if $compiler_warning attrib.out >/dev/null 2>&1; then
echo "Your C compiler doesn't support __attribute__((unused))."
val="$undef"
else
int I_am_deprecated(void) __attribute__((deprecated));
EOCP
if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
- if $contains 'warning' attrib.out >/dev/null 2>&1; then
+ if $compiler_warning attrib.out >/dev/null 2>&1; then
echo "Your C compiler doesn't support __attribute__((deprecated))."
val="$undef"
else
int I_will_not_be_ignored(void) __attribute__((warn_unused_result));
EOCP
if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
- if $contains 'warning' attrib.out >/dev/null 2>&1; then
+ if $compiler_warning attrib.out >/dev/null 2>&1; then
echo "Your C compiler doesn't support __attribute__((warn_unused_result))."
val="$undef"
else
static __inline__ __attribute__((always_inline)) int I_will_always_be_inlined(void);
EOCP
if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
- if $contains 'warning' attrib.out >/dev/null 2>&1; then
+ if $compiler_warning attrib.out >/dev/null 2>&1; then
echo "Your C compiler doesn't support __attribute__((always_inline))."
val="$undef"
else