flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > Bug in REPT preprocessor directive

Author
Thread Post new topic Reply to topic
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 12 Nov 2007, 00:02
It was discovered by MCD at http://board.flatassembler.net/topic.php?p=64495#64495 .

The problem is the following, if you use rept as "REPT x {...}" where x is a zero followed by a symbol character (except ";"), no matter was follows it is accepted by the preprocessor without triggering any error.

Code:
  rept 0[alfa {display "^"}
  rept 0*/$·%& {...}
  rept 0{298yrgf{{{{{{}    

Any line of the code above triggers an error.
Post 12 Nov 2007, 00:02
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8354
Location: Kraków, Poland
Tomasz Grysztar 09 Jul 2008, 16:39
Fixed in 1.67.27.
However note, that:
Code:
rept 0{298yrgf{{{{{{}    

is correct. You are allowed to use the { character inside the macro body without limitations.
Post 09 Jul 2008, 16:39
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.