[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: avoid some warnings in tests
From: |
Bruno Haible |
Subject: |
Re: avoid some warnings in tests |
Date: |
Sat, 24 Oct 2009 15:15:04 +0200 |
User-agent: |
KMail/1.9.9 |
Hi Eric,
> Simon and Bruno
> had the most other tests that used 'main ()'; C89 says you should use
> 'main (void)' or 'main (int, char**)'
Can you please show me where C89 or C99 says that 'main()' should not be
used?
According to my understanding of C99,
- foo() as a function _definition_ defines a function with 0 arguments,
not with varargs. (Things are different for a function _declaration_
without a body.)
- There is no reason for GCC to warn about foo().
Please report GCC bugs to GCC, so that it gets fixed at some point.
Bruno