diff --git a/PBot/VERSION.pm b/PBot/VERSION.pm index dc75311e..2983ce0c 100644 --- a/PBot/VERSION.pm +++ b/PBot/VERSION.pm @@ -13,7 +13,7 @@ use warnings; # These are set automatically by the build/commit script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 454, + BUILD_REVISION => 455, BUILD_DATE => "2013-10-19", }; diff --git a/modules/c2english.pl b/modules/c2english.pl index 71c8f032..bad92f57 100755 --- a/modules/c2english.pl +++ b/modules/c2english.pl @@ -72,7 +72,7 @@ open my $fh, '>', 'code.c' or die "Could not write code: $!"; print $fh $code; close $fh; -my ($ret, $result) = execute(10, "gcc -std=c89 -pedantic -Werror -Wno-unused -c code.c"); +my ($ret, $result) = execute(10, "gcc -std=c89 -pedantic -Werror -Wno-unused -fsyntax-only -fno-diagnostics-show-option code.c"); if($ret != 0) { $output = $result; @@ -128,6 +128,7 @@ if($ret != 0) { $output =~ s/<'(.*)' = char>/<'$1' = int>/g; $output =~ s/= (-?\d+) ''/= $1/g; $output =~ s/, //g; + $output =~ s/\s*error: expected ';' before 'return'//g; print "$output\n"; exit 0; @@ -154,7 +155,8 @@ $output =~ s/to an integer/to int/g; $output =~ s/with no arguments returning/with unspecified arguments returning/g; $output =~ s/with argument a void/with no arguments/g; $output =~ s/\s*After that,\s*$//; -$output =~s/as long as zero does not equal 1/while the condition is true/g; +$output =~ s/as long as zero does not equal 1/while the condition is true/g; +$output =~ s/\ncompute nothing.//g; $output =~ s/\s+/ /; if($output eq " ") {