Regression in rcparse.y

Roger Sayle roger@metaphorics.com
Wed Oct 11 19:15:00 GMT 2000


On Wed, 11 Oct 2000, DJ Delorie wrote:
> > ICON myicon,   901, 30, 30
>        ^^^^^^
> Does this really remain a string, or does the preprocessor replace it
> with a number?  VC98 puts, for example, IDI_FOO there, but resource.h
> has a #define for IDI_FOO which replaces it with a number.  I tried
> putting a random string in one of my working ICON controls, but RC
> from VC98 wouldn't take it, even if I used a global search-and-replace
> to get both the use and the definition.
> 
> I suspect that even VC98 supports only a quoted string or a number.

Alas I haven't seen the VC98 documentation, I only included that case
as it was introduced by your 13 June patch.  The rule for "id" allows
both a number *and* an unquoted string.  Hence with the current CVS
windres the following resource file works.


#include "windows.h"

myicon ICON "myicon.ico"

AboutBox DIALOG 25, 20, 150, 88
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "About"
FONT 8,"Helv"
BEGIN
    ICON myicon, 0, 2, 2, 0, 0, SS_ICON
END


If the current support for this syntax is accidental and not recognized
by VC98, it should probably be removed before it creates even more
confusion.  Simply remove the "| STRING" clause in my previously
suggested proto-patch.

Roger
--
Roger Sayle,                         E-mail: roger@metaphorics.com
Bioinformatics Group, Metaphorics,   WWW: http://www.metaphorics.com/
Office 104, 441 Greg Avenue,         Tel: (+1) 505-954-3281
Santa Fe, New Mexico, 87501.         Fax: (+1) 505-989-1200



More information about the Binutils mailing list