bcc icon indicating copy to clipboard operation
bcc copied to clipboard

Inline-C: inline c on last line misses semicolon (with no newline at end)

Open GWRon opened this issue 1 year ago • 1 comments

SuperStrict
Framework Brl.StandardIO

'!printf("hello");
	'what?
'!printf("I said hello");
'remove the comment to make it break

Remove the last line comment and the generated code becomes:

...
		#line 4 "/home/ronny/Arbeit/Tools/BlitzMaxNG/tmp/untitled1.bmx"
		printf("hello");
		#line 6 "/home/ronny/Arbeit/Tools/BlitzMaxNG/tmp/untitled1.bmx"
		printf("I said hello")
		return 0;
...

It misses to add the ";" to the second printf;

It might indicate a bug when reading "comments" (until EOF is reached)

GWRon avatar Mar 20 '23 09:03 GWRon