A "#" does start a comment, not a label.
authorClifford Wolf <clifford@clifford.at>
Thu, 16 Apr 2015 16:13:41 +0000 (18:13 +0200)
committerClifford Wolf <clifford@clifford.at>
Thu, 16 Apr 2015 16:13:41 +0000 (18:13 +0200)
kernel/yosys.cc

index 3076158bd9e5397cc87c443e2ea000bfeebafec2..7494b7e3c74e33b870b14f2a89113b82edf0025b 100644 (file)
@@ -698,6 +698,9 @@ static void handle_label(std::string &command, bool &from_to_active, const std::
        while (pos < GetSize(command) && (command[pos] == ' ' || command[pos] == '\t'))
                pos++;
 
+       if (pos < GetSize(command) && command[pos] == '#')
+               return;
+
        while (pos < GetSize(command) && command[pos] != ' ' && command[pos] != '\t' && command[pos] != '\r' && command[pos] != '\n')
                label += command[pos++];