On Wed, Sep 18, 2002 at 10:30:52AM +0200, fvwm-workers wrote:
[snip]
> How about this:  write a small test program that issues lots of
> warnings with -Wall and AC_TRY_COMPILE it.  When that fails,
> configure bugs out with an error message.

This is the test code I came up with.  To the best of my
knowledge, every ANSI C compiler should be able to compile it, but
not without warnings:

----------------------- warn.c -------------------
  #include <stdio.h>
  main(const i, const int * const p)
  {
    char *c;

    switch (*p = p = *c)
    {
    case 0:
      printf("%p", c, p);
    }
    *c = &i;
    c = p;
    while (1 || (unsigned int)3 >= 0 ||
           ((int)-1) == ((unsigned int)1));

    return;
  }
--------------------------------------------------

It's meant to provoke a number of non-fatal warnings that would
cause compilation to fail with -Werror or a similar option in
other compilers.  It's very important that it doesn't fail without
such an option.  So I ask everybody to review it and/or try to
compile it with

  $ cc warn.c

If it doesn't compile with any *C* compiler, please report back.
I'm fully aware that it won't compile on *C++* compilers.

Bye

Dominik ^_^  ^_^

 --
Dominik Vogt, mail: [EMAIL PROTECTED], phone: 0721/91374-382
Schlund + Partner AG, Erbprinzenstr. 4-12, D-76133 Karlsruhe
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [EMAIL PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]

Reply via email to