Discussion:
[xHarbour-developers] Error E0047 Code block contains both macro and declared symbol references
Mario Simoes Filho
2016-10-08 13:31:36 UTC
Permalink
Hi, guys,
when compiling the example below the error occurs
"Error E0047 Code block contains both macro and declared symbol references"
the last line
to remove the line LOCATE error "disappears"

Mario

<CODE>

#include "hbclass.ch"

PROCEDURE Main( )
RETURN

CLASS test

METHOD Locate( cExp )
ENDCLASS


METHOD Locate( cExp ) CLASS test

Select( ::nArea )

LOCATE FOR &cExp // coment this line

RETURN Self

STATIC FUNCTION EarlyFieldBlock( nField )

return {|Self, xVal| IIF( PCount() == 2, ( Self:nArea )->( FieldPut(
nField, xVal ) ), ( Self:nArea )->( FieldGet( nField ) ) ) }
Enrico Maria Giordano
2016-10-08 13:35:41 UTC
Permalink
Post by Mario Simoes Filho
Hi, guys,
when compiling the example below the error occurs
"Error E0047 Code block contains both macro and declared symbol references"
the last line
to remove the line LOCATE error "disappears"
You have to use

LOCATE FOR &( cExp )

EMG

--
http://www.emagsoftware.it
http://www.emagsoftware.it/emgmusic
http://www.emagsoftware.it/spectrum
http://www.emagsoftware.it/tbosg
Luiz Rafael Culik
2016-10-08 15:57:36 UTC
Permalink
Ron

Changes was needed on startup functions due new gcc versions that was not
loading correct the symbols

Regards
Luiz
Dear Luiz,
I recently received notifications from SF of changes to xHarbour which I
did not see any notification on the Developers Group.
Could you please describe the changes? When changes of this scope take
place I believe it is important to describe to the group what the change is
about, what new functionality it adds, or problem it solves. This is true
even for BORROWED code, because many might not follow Harbour and have no
clue what such code changes intend to achieve.
Also, please make sure that all changes are reported on this forum.
TIA,
Ron
------------------------------
* include/hbapi.h
* Added new functions borrow from harbour
* include/hbinit.h
* updated to allow new gcc to compile borrow ideia from harbour
* include/hbvm.h
! Added ULONG ulId to the follow functions : hb_vmProcessSymbols,
hb_vmProcessSysDllSymbols, hb_vmProcessPrgDllSymbols,hb_
vmProcessExeUsesDllSymbols
* include/hbvmpub.h
! added ULONG ulID; to SYMBOLS structure borrow from harbour
! Added ULONG ulId to the follow function : hb_vmRegisterSymbols
* source/common/hbstr.c
! Added new functions HB_NTOC borrow from harbour
* source/compiler/genc.c
! changed to generate the new HB_INIT_SYMBOLS_EX_END
* source/rtl/hbntos.c
! added new function
* source/vm/hvm.c
hb_vmProcessSymbols, hb_vmProcessSysDllSymbols,
hb_vmProcessPrgDllSymbols,hb_vmProcessExeUsesDllSymbols and
hb_vmRegisterSymbols
* source/vm/estack.c
* source/vm/initsymb.c
* source/vm/maindlle.c
* source/vm/maindllh.c
* source/vm/maindllp.c
* source/vm/runner.c
* source/vm/usedll.c
! updated to reflect the change on hb_vmProcessSymbols
By lculik on 10/02/2016 18:33
*View Changes* <https://sourceforge.net/p/xharbour/code/10160/>
Ron Pinkas
2016-11-02 21:19:56 UTC
Permalink
Luiz,

Please provide more detailed info. Almost everyday I get new emails about
compile errors, "code block contains both macro and a declared symbol" on
perfectly valid code which does not even have any macro!!!

I now also get emails about simple INLINE Methods that always worked, now
raising RTE about invalid argument.

We can not afford this kind of low level instability! People are begining
to "fix" perfectly valid code, and this ends up causing real RISK.

Please take the time to EXPLAIN the exact nature of the changes, in
DETAIL!!!

Ron
Post by Luiz Rafael Culik
Ron
Changes was needed on startup functions due new gcc versions that was not
loading correct the symbols
Regards
Luiz
Dear Luiz,
I recently received notifications from SF of changes to xHarbour which I
did not see any notification on the Developers Group.
Could you please describe the changes? When changes of this scope take
place I believe it is important to describe to the group what the change is
about, what new functionality it adds, or problem it solves. This is true
even for BORROWED code, because many might not follow Harbour and have no
clue what such code changes intend to achieve.
Also, please make sure that all changes are reported on this forum.
TIA,
Ron
------------------------------
* include/hbapi.h
* Added new functions borrow from harbour
* include/hbinit.h
* updated to allow new gcc to compile borrow ideia from harbour
* include/hbvm.h
! Added ULONG ulId to the follow functions : hb_vmProcessSymbols,
hb_vmProcessSysDllSymbols, hb_vmProcessPrgDllSymbols,hb_v
mProcessExeUsesDllSymbols
* include/hbvmpub.h
! added ULONG ulID; to SYMBOLS structure borrow from harbour
! Added ULONG ulId to the follow function : hb_vmRegisterSymbols
* source/common/hbstr.c
! Added new functions HB_NTOC borrow from harbour
* source/compiler/genc.c
! changed to generate the new HB_INIT_SYMBOLS_EX_END
* source/rtl/hbntos.c
! added new function
* source/vm/hvm.c
hb_vmProcessSymbols, hb_vmProcessSysDllSymbols,
hb_vmProcessPrgDllSymbols,hb_vmProcessExeUsesDllSymbols and
hb_vmRegisterSymbols
* source/vm/estack.c
* source/vm/initsymb.c
* source/vm/maindlle.c
* source/vm/maindllh.c
* source/vm/maindllp.c
* source/vm/runner.c
* source/vm/usedll.c
! updated to reflect the change on hb_vmProcessSymbols
By lculik on 10/02/2016 18:33
*View Changes* <https://sourceforge.net/p/xharbour/code/10160/>
Enrico Maria Giordano
2016-11-02 22:14:00 UTC
Permalink
Post by Ron Pinkas
Luiz,
Please provide more detailed info. Almost everyday I get new emails
about compile errors, "code block contains both macro and a declared
symbol" on perfectly valid code which does not even have any macro!!!
Me too. But I have to say that I've nener been able to reproduce that
error...

EMG

--
http://www.emagsoftware.it
http://www.emagsoftware.it/emgmusic
http://www.emagsoftware.it/spectrum
http://www.emagsoftware.it/tbosg
Enrico Maria Giordano
2016-11-02 22:20:47 UTC
Permalink
Post by Enrico Maria Giordano
Me too. But I have to say that I've nener been able to reproduce that
error...
Ok, I just get this sample from Patrick on comp.lang.xharbour:

FUNCTION Test()
LOCAL cTemp
SET FILTER TO &cTemp
INDEX ON field->TEST TAG TEST
RETURN NIL

I always used

SET FILTER TO &( cTemp )

to avoid the error. But I just test the Patrick sample using Harbour and
there is no error.

EMG

--
http://www.emagsoftware.it
http://www.emagsoftware.it/emgmusic
http://www.emagsoftware.it/spectrum
http://www.emagsoftware.it/tbosg
Ron Pinkas
2016-11-03 00:31:07 UTC
Permalink
I must apologize, it may be related to a change I made Aug 15.

I am currently reviewing.

Ron
Post by Enrico Maria Giordano
Post by Enrico Maria Giordano
Me too. But I have to say that I've nener been able to reproduce that
error...
FUNCTION Test()
LOCAL cTemp
SET FILTER TO &cTemp
INDEX ON field->TEST TAG TEST
RETURN NIL
I always used
SET FILTER TO &( cTemp )
to avoid the error. But I just test the Patrick sample using Harbour and there is no error.
EMG
--
http://www.emagsoftware.it
http://www.emagsoftware.it/emgmusic
http://www.emagsoftware.it/spectrum
http://www.emagsoftware.it/tbosg
Enrico Maria Giordano
2016-11-03 09:25:00 UTC
Permalink
The issue of RTE on INLINE Method is SEPARATE, and someone should forward a reduced sample.
I just request a sample in comp.lang.xharbour. Let's hope someone has one...

EMG

--
http://www.emagsoftware.it
http://www.emagsoftware.it/emgmusic
http://www.emagsoftware.it/spectrum
http://www.emagsoftware.it/tbosg

Luiz Rafael Culik
2016-11-03 06:24:43 UTC
Permalink
Hi Ron

I dont have knowloge to change the compiler. And the internal i change dont
produce this kind of error

Regards
Luiz

Em 2 de nov de 2016 19:20, "Ron Pinkas" <***@xharbour.com> escreveu:

Luiz,

Please provide more detailed info. Almost everyday I get new emails about
compile errors, "code block contains both macro and a declared symbol" on
perfectly valid code which does not even have any macro!!!

I now also get emails about simple INLINE Methods that always worked, now
raising RTE about invalid argument.

We can not afford this kind of low level instability! People are begining
to "fix" perfectly valid code, and this ends up causing real RISK.

Please take the time to EXPLAIN the exact nature of the changes, in
DETAIL!!!

Ron
Post by Luiz Rafael Culik
Ron
Changes was needed on startup functions due new gcc versions that was not
loading correct the symbols
Regards
Luiz
Dear Luiz,
I recently received notifications from SF of changes to xHarbour which I
did not see any notification on the Developers Group.
Could you please describe the changes? When changes of this scope take
place I believe it is important to describe to the group what the change is
about, what new functionality it adds, or problem it solves. This is true
even for BORROWED code, because many might not follow Harbour and have no
clue what such code changes intend to achieve.
Also, please make sure that all changes are reported on this forum.
TIA,
Ron
------------------------------
* include/hbapi.h
* Added new functions borrow from harbour
* include/hbinit.h
* updated to allow new gcc to compile borrow ideia from harbour
* include/hbvm.h
! Added ULONG ulId to the follow functions : hb_vmProcessSymbols,
hb_vmProcessSysDllSymbols, hb_vmProcessPrgDllSymbols,hb_v
mProcessExeUsesDllSymbols
* include/hbvmpub.h
! added ULONG ulID; to SYMBOLS structure borrow from harbour
! Added ULONG ulId to the follow function : hb_vmRegisterSymbols
* source/common/hbstr.c
! Added new functions HB_NTOC borrow from harbour
* source/compiler/genc.c
! changed to generate the new HB_INIT_SYMBOLS_EX_END
* source/rtl/hbntos.c
! added new function
* source/vm/hvm.c
hb_vmProcessSymbols, hb_vmProcessSysDllSymbols,
hb_vmProcessPrgDllSymbols,hb_vmProcessExeUsesDllSymbols and
hb_vmRegisterSymbols
* source/vm/estack.c
* source/vm/initsymb.c
* source/vm/maindlle.c
* source/vm/maindllh.c
* source/vm/maindllp.c
* source/vm/runner.c
* source/vm/usedll.c
! updated to reflect the change on hb_vmProcessSymbols
By lculik on 10/02/2016 18:33
*View Changes* <https://sourceforge.net/p/xharbour/code/10160/>
Enrico Maria Giordano
2016-10-08 16:24:33 UTC
Permalink
Dear Luiz,
I recently received notifications from SF of changes to xHarbour which I
did not see any notification on the Developers Group.
Could you please describe the changes? When changes of this scope take
place I believe it is important to describe to the group what the change
is about, what new functionality it adds, or problem it solves. This is
true even for BORROWED code, because many might not follow Harbour and
have no clue what such code changes intend to achieve.
Also, please make sure that all changes are reported on this forum.
+1

EMG

--
http://www.emagsoftware.it
http://www.emagsoftware.it/emgmusic
http://www.emagsoftware.it/spectrum
http://www.emagsoftware.it/tbosg
Loading...