From f336ac266e953ecf0346a4f32c3c247b0bf23fe1 Mon Sep 17 00:00:00 2001 From: Ron Pinkas Date: Sun, 14 May 2000 16:47:48 +0000 Subject: [PATCH] 20000514-09:45 GMT-8 Ron Pinkas * source/compiler/harbour.y ! Fixed GPF when using DECLARE CLASS and -w < 3 * source/compiler/harbour.c ! Fixed GPF when using DECLARE CLASS and -w < 3 --- harbour/ChangeLog | 8 ++++++++ harbour/source/compiler/harbour.c | 3 +++ harbour/source/compiler/harbour.y | 6 ++++-- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index bff08e17c3..36e6415f93 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,11 @@ +20000514-09:45 GMT-8 Ron Pinkas + + * source/compiler/harbour.y + ! Fixed GPF when using DECLARE CLASS and -w < 3 + + * source/compiler/harbour.c + ! Fixed GPF when using DECLARE CLASS and -w < 3 + 20000514-09:10 GMT-8 Ron Pinkas * source/compiler/harbour.l diff --git a/harbour/source/compiler/harbour.c b/harbour/source/compiler/harbour.c index f97632efea..fe66697ca2 100644 --- a/harbour/source/compiler/harbour.c +++ b/harbour/source/compiler/harbour.c @@ -835,6 +835,9 @@ PCOMCLASS hb_compClassFind( char * szClassName ) { PCOMCLASS pClass = hb_comp_pFirstClass; + if ( hb_comp_iWarnings < 3 ) + return NULL; + while( pClass ) { if( ! strcmp( pClass->szName, szClassName ) ) diff --git a/harbour/source/compiler/harbour.y b/harbour/source/compiler/harbour.y index 909eb2e67d..df4421fb9c 100644 --- a/harbour/source/compiler/harbour.y +++ b/harbour/source/compiler/harbour.y @@ -275,12 +275,14 @@ ClassInfo : DecMethod | ClassInfo DecData ; -DecMethod : CLASS_METHOD IdentName { hb_comp_pLastMethod = hb_compMethodAdd( hb_comp_pLastClass, $2 ); } DecParams AsType { hb_comp_pLastMethod->cType = hb_comp_cVarType; +DecMethod : CLASS_METHOD IdentName { hb_comp_pLastMethod = hb_compMethodAdd( hb_comp_pLastClass, $2 ); } DecParams AsType { if ( hb_comp_pLastMethod ) + hb_comp_pLastMethod->cType = hb_comp_cVarType; hb_comp_pLastMethod = NULL; hb_comp_cVarType = ' '; } ; -DecData : CLASS_DATA IdentName { hb_comp_pLastMethod = hb_compMethodAdd( hb_comp_pLastClass, $2 ); } AsType { hb_comp_pLastMethod->cType = hb_comp_cVarType; +DecData : CLASS_DATA IdentName { hb_comp_pLastMethod = hb_compMethodAdd( hb_comp_pLastClass, $2 ); } AsType { if ( hb_comp_pLastMethod ) + hb_comp_pLastMethod->cType = hb_comp_cVarType; hb_comp_pLastMethod = NULL; hb_comp_cVarType = ' '; } ;