This is the mail archive of the gcc-cvs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

r108489 - in /trunk/gcc: ChangeLog c-common.c c...


Author: bje
Date: Tue Dec 13 23:33:26 2005
New Revision: 108489

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=108489
Log:
	* c-common.c (c_common_truthvalue_conversion): Generalise warning
	for addresses converted to booleans; not just function addresses.
	* c-typeck.c (build_binary_op): Warn for address comparisons which
	can never be NULL (eg. func == NULL or &var == NULL).
	* common.opt (Walways-true): New option.
	* c-opts.c (c_common_handle_option): Set it with -Wall.
	* doc/invoke.texi: Document it.
testsuite/
	* gcc.dg/warn-addr-cmp.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/warn-addr-cmp.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-common.c
    trunk/gcc/c-opts.c
    trunk/gcc/c-typeck.c
    trunk/gcc/common.opt
    trunk/gcc/doc/invoke.texi
    trunk/gcc/testsuite/ChangeLog


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]