bug-automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Maintainer checks for non-c89 constructs?


From: James Youngman
Subject: Maintainer checks for non-c89 constructs?
Date: Sat, 9 Jun 2007 12:41:08 +0100

I maintain findutils on a GNU/Linux system using GCC.  Findutils uses
gnulib to provide a number of portability features, and also
extensions not in c89 such as "bool".   With the help of gnulib, some
non-c89 things are available on c89-based systems.

However, gnulib cannot make the compiler look like a c99 compiler
because for example a c89 compiler would correctly reject this:

int
foo (void)
{
 int x = 2;
 printf ("hello\n");
 int y = 3;   /* problem here */
 /* ... */
 return 0;
}

GCC accepts this construct because it is (or can be) a c99 compiler.
I find that about twice a year someone submits a bug report because
I've accidentally used a non-c89 construct without noticing.   Is
there any way I can use Automake to help me avoid this?

For example, is there any way to get "make distcheck" to try, where
possible, to compile in c89 mode if the compiler is GCC?   There are a
number of other flags and combinations which might be useful.

Thanks,
James.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]