This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [libcpp] modify undef diagnostic
- From: Jeff Law <law at redhat dot com>
- To: Prathamesh Kulkarni <bilbotheelffriend at gmail dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 19 May 2014 13:02:21 -0600
- Subject: Re: [libcpp] modify undef diagnostic
- Authentication-results: sourceware.org; auth=none
- References: <CAJXstsCYvNfocx_ztDO4qeH7o+h_6D31fbuBMuUx2Ns4sDorew at mail dot gmail dot com>
On 04/29/14 09:28, Prathamesh Kulkarni wrote:
Append "evaluates to 0", in Wundef diagnostic.
clang prints the following diagnostic for -Wundef:
undef.c:1:5: warning: 'FOO' is not defined, evaluates to 0 [-Wundef]
#if FOO
^
OK to commit ?
[libcpp]
* expr.c (eval_token): Modify Wundef diagnostic.
[gcc/testsuite/gcc.dg/cpp]
* warn-undef.c: Append "evaluates to 0" to dg-warning.
* warn-undef-2.c: Append "evaluates to 0" to dg-error.
OK for the trunk assuming there's no testsuite regresssions with your patch.
jeff