flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution
toto.v2, toto.v3 and toto.v5 are not local labels. So the last one (toto.v2) will be the current global label that .x attaches to.
|
|||
![]() |
|
ouadji
Quote: toto.v2, toto.v3 and toto.v5 are not local labels. their symbolic values are merged with "union" at the symbolic level, toto.v2 = toto.v3 = toto.v5 |
|||
![]() |
|
revolution
union can't perform magic. How would you make three current global labels and have .x attach to them all?
|
|||
![]() |
|
ouadji
three current global labels ... here is the problem ! toto.v2, toto.v3 and toto.v5 are not 3 global labels but only one, with three different names, because "union" mov [toto.v3],1 mov eax,[toto.v2] ;eax == 1 |
|||
![]() |
|
revolution
ouadji wrote: toto.v2, toto.v3 and toto.v5 are not 3 global labels But even if they weren't, it is not possible for union make all three attach to .x simultaneously. |
|||
![]() |
|
ouadji
obviously that is possible fasm is built in assembler and with assembler all is possible. In this case, the symbolic value of "union" is not respected. I think that should be fixed, Tomasz ? what do you think about that ? |
|||
![]() |
|
revolution
Are you aware that union is a macro? Hence the assembler has no knowledge that union even exists.
|
|||
![]() |
|
ouadji
one point ![]() edit: maybe create a new feature in the macro language to allow this ? |
|||
![]() |
|
Fanael
The question is: what are you exactly trying to achieve and why?
|
|||
![]() |
|
ouadji
no, it's not a question about "what" and "how", just a matter of theory ... a matter about compiler overall coherence. |
|||
![]() |
|
Tomasz Grysztar
As "struct" is just a macro, the only real view of "compiler coherence" would be when looking at what is processed after the macro is expanded. And when you look at preprocessed source, everything works exactly as it should.
Macros may be changed and improved over time (you can even have various "struct" alternatives provided, so that you can simply include the one of your choice, but still have some other available) and it has nothing to do with compiler itself. As it seems that using parser-stage locals mechanism with "struct" macros bothers you much, I modified the "struct" (which before had undefined behavior with respect to what global label context it leaves for the code that follows) to define context of its own name. So now: Code: toto X
.x: |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.