From 0fbe4458714bdcff93c7f6752f7ef2bc8493e26c Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 22 Jul 2010 10:43:08 +0200 Subject: [PATCH] wrc: Display a warning in pedantic mode when using memory options in 32-bit resources. --- tools/wrc/parser.y | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/tools/wrc/parser.y b/tools/wrc/parser.y index cfc02f973c5..8c491140343 100644 --- a/tools/wrc/parser.y +++ b/tools/wrc/parser.y @@ -1708,15 +1708,22 @@ loadmemopts } ; -lamo : tPRELOAD { $$ = new_int(WRC_MO_PRELOAD); } - | tMOVEABLE { $$ = new_int(WRC_MO_MOVEABLE); } - | tDISCARDABLE { $$ = new_int(WRC_MO_DISCARDABLE); } - | tPURE { $$ = new_int(WRC_MO_PURE); } +lamo : tPRELOAD { $$ = new_int(WRC_MO_PRELOAD); + if (win32 && pedantic) parser_warning("PRELOAD is ignored in 32-bit mode\n"); } + | tMOVEABLE { $$ = new_int(WRC_MO_MOVEABLE); + if (win32 && pedantic) parser_warning("MOVEABLE is ignored in 32-bit mode\n"); } + | tDISCARDABLE { $$ = new_int(WRC_MO_DISCARDABLE); + if (win32 && pedantic) parser_warning("DISCARDABLE is ignored in 32-bit mode\n"); } + | tPURE { $$ = new_int(WRC_MO_PURE); + if (win32 && pedantic) parser_warning("PURE is ignored in 32-bit mode\n"); } ; -lama : tLOADONCALL { $$ = new_int(~WRC_MO_PRELOAD); } - | tFIXED { $$ = new_int(~WRC_MO_MOVEABLE); } - | tIMPURE { $$ = new_int(~WRC_MO_PURE); } +lama : tLOADONCALL { $$ = new_int(~WRC_MO_PRELOAD); + if (win32 && pedantic) parser_warning("LOADONCALL is ignored in 32-bit mode\n"); } + | tFIXED { $$ = new_int(~WRC_MO_MOVEABLE); + if (win32 && pedantic) parser_warning("FIXED is ignored in 32-bit mode\n"); } + | tIMPURE { $$ = new_int(~WRC_MO_PURE); + if (win32 && pedantic) parser_warning("IMPURE is ignored in 32-bit mode\n"); } ; /* ------------------------------ Win32 options ------------------------------ */