This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: windres bug fix
Hi Eric,
> I created a simple test case to demonstrate the incompatibility. The
> attached file contains two test cases. The dialog0 test case does not set
> the DISCARDABLE flag. This test will fail. The dialog1 test case sets the
> DISCARDABLE flag and will pass.
Thanks very much. I have inserted your test cases into the testsuite
and applied the patch below to fix the problem.
Cheers
Nick
binutils/testsuite/ChangeLog
2002-04-16 Eric Kohl <ekohl@rz-online.de>
* binutils-all/windres/dialog0.rc: New test case: Check default
attributes for dialogs
* binutils-all/windres/dialog0.rsd: New file: Expected output.
* binutils-all/windres/dialog1.rc: New test case: Check
DISCARDABLE flag is propagated.
* binutils-all/windres/dialog1.rsd: New file: Expected output.
binutils/ChangeLog
2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
* rcparse.y: Set MEMFLAG_DISCARDABLE by default.
Index: rcparse.y
===================================================================
RCS file: /cvs/src/src/binutils/rcparse.y,v
retrieving revision 1.13
diff -c -3 -p -w -r1.13 rcparse.y
*** rcparse.y 15 Apr 2002 14:12:37 -0000 1.13
--- rcparse.y 16 Apr 2002 06:52:18 -0000
*************** suboptions:
*** 1357,1363 ****
memset (&$$, 0, sizeof (struct res_res_info));
$$.language = language;
/* FIXME: Is this the right default? */
! $$.memflags = MEMFLAG_MOVEABLE | MEMFLAG_PURE;
}
| suboptions memflag
{
--- 1357,1363 ----
memset (&$$, 0, sizeof (struct res_res_info));
$$.language = language;
/* FIXME: Is this the right default? */
! $$.memflags = MEMFLAG_MOVEABLE | MEMFLAG_PURE | MEMFLAG_DISCARDABLE;
}
| suboptions memflag
{
*************** memflags_move:
*** 1406,1412 ****
{
memset (&$$, 0, sizeof (struct res_res_info));
$$.language = language;
! $$.memflags = MEMFLAG_MOVEABLE | MEMFLAG_PURE;
}
| memflags_move memflag
{
--- 1406,1412 ----
{
memset (&$$, 0, sizeof (struct res_res_info));
$$.language = language;
! $$.memflags = MEMFLAG_MOVEABLE | MEMFLAG_PURE | MEMFLAG_DISCARDABLE;
}
| memflags_move memflag
{