This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [fixinc patch] Add disabled hacks from old fixincludes 2/5
- 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 14:16:39 -0700
- Subject: Re: [fixinc patch] Add disabled hacks from old fixincludes 2/5
- Organization: Home
- References: <20030826202836.GA2724@twcny.rr.com>
Nathanael Nerode wrote:
>
> Bruce, OK for mainline? How's my sed expression look?
>
> * fixinc/inclhack.def (ptx_sys_mc_param_h): New disabled fix,
> ported from fixinc.ptx.
Sed expressions are (mostly) write-only. I don't see a test-text:
test-text = <<_END_OF_TEST_
static inline void non_gnu( void )
{
__asm( "# non-GNU assembler code\n" );
}
_END_OF_TEST_;
make sure the result is what you want (omit the #ifdef and run a make check):
static inline void non_gnu( void ) {
#if !defined (__GNUC__) && !defined (__GNUG__)
__asm( "# non-GNU assembler code\n" );
#endif
}
> +#ifdef PTX
> +fix = {
> + hackname = ptx_sys_mc_param_h;
> + file = sys/mc_param.h;
> + sed = "/__asm/,/}/{\n"
> + "/__asm/i#if !defined (__GNUC__) && !defined (__GNUG__)\n"
> + "/}/a#endif\n"
> + "}";
> +};
> +#endif