This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [fixinc] Fixing the last recalcitrant test case
- From: Bruce Korb <bkorb at veritas dot com>
- To: Nathanael Nerode <neroden at twcny dot rr dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 26 Aug 2003 18:10:28 -0700
- Subject: Re: [fixinc] Fixing the last recalcitrant test case
- Organization: Home
- References: <20030826235900.GA7791@twcny.rr.com>
Nathanael Nerode wrote:
>
> This issue consists entirely of line endings. The 'undefine_null' hack
> tests for \r\n terminated lines, *and preserves the \r\n ending*. This is
> tested. This means that the actual output after the hack always has \r\n
> line endings. But the base copy doesn't.
>
> I could amend the base copy to have the appropriate \r\n line endings (as
> in the pseudo-patch below). But I'm not at all sure that's the right thing
> to do; I doubt that we really want that in CVS or tarballs or anything.
> Since there are *lots* of other hacks which insert lines with \n endings,
> I don't see why we're preserving the \r\n line endings in this case. So
> perhaps I could simply change the fix to drop the \r's it finds.
>
> Any opinions on what is best here?
No. :-) Looking at this cruft, it looks like I was preserving
some behavior from way back whenever. It is a nuisance. If the
``-qwb'' option makes this issue go away, then forget it. Otherwise,
we should either stop messing with \r or we should fix the base test.
> Index: tests/base/testing.h
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/fixinc/tests/base/testing.h,v
> retrieving revision 1.12
> diff -u -r1.12 testing.h
> --- tests/base/testing.h 22 Apr 2003 23:41:28 -0000 1.12
> +++ tests/base/testing.h 26 Aug 2003 23:51:56 -0000
> @@ -113,9 +113,9 @@
>
>
> #if defined( UNDEFINE_NULL_CHECK )
> -#ifndef NULL
> -#define NULL 0UL
> -#endif
> +#ifndef NULL
> +#define NULL 0UL
> +#endif
> #ifndef NULL
> #define NULL ((void*)0)
> #endif