Bug 25422 - [4.2 Regression] gcc.dg/20031012-1.c and gcc.dg/weak/weak-3.c (and a couple others) fails, forgot to update for new option, -Walways-true
Summary: [4.2 Regression] gcc.dg/20031012-1.c and gcc.dg/weak/weak-3.c (and a couple o...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: testsuite (show other bugs)
Version: 4.2.0
: P3 normal
Target Milestone: 4.2.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-14 22:23 UTC by Andrew Pinski
Modified: 2005-12-16 22:14 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-12-14 22:52:01


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Pinski 2005-12-14 22:23:23 UTC
FAIL: gcc.dg/20031012-1.c  (test for warnings, line 13)
FAIL: gcc.dg/weak/weak-3.c  (test for warnings, line 57)
FAIL: g++.old-deja/g++.mike/warn8.C  (test for warnings, line 14)
FAIL: g++.old-deja/g++.mike/warn8.C  (test for warnings, line 16)

Those all fail because the tests were forgot to be updated for the new option -Walways-true.
Comment 1 Andrew Pinski 2005-12-14 22:52:01 UTC
Caused by:
2005-12-14  Ben Elliston  <bje@au.ibm.com>
        
        * 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.
Comment 2 Ben Elliston 2005-12-16 22:13:00 UTC
Subject: Bug 25422

Author: bje
Date: Fri Dec 16 22:12:55 2005
New Revision: 108689

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=108689
Log:
	PR testsuite/25422
	* gcc.dg/20031012-1.c: Add -Walways-true option.
	* gcc.dg/weak/weak-3.c: Likewise.
	* g++.old-deja/g++.mike/warn8.C: Likewise.

Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/g++.old-deja/g++.mike/warn8.C
    trunk/gcc/testsuite/gcc.dg/20031012-1.c
    trunk/gcc/testsuite/gcc.dg/weak/weak-3.c

Comment 3 Ben Elliston 2005-12-16 22:14:21 UTC
Fixed.