From: Clifford Wolf Date: Thu, 16 Apr 2015 16:13:41 +0000 (+0200) Subject: A "#" does start a comment, not a label. X-Git-Tag: yosys-0.6~325 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cfdc9fc50ed3280fb1e048bbf6125f009ab44403;p=yosys.git A "#" does start a comment, not a label. --- diff --git a/kernel/yosys.cc b/kernel/yosys.cc index 3076158bd..7494b7e3c 100644 --- a/kernel/yosys.cc +++ b/kernel/yosys.cc @@ -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++];