jupyter-c-kernel
jupyter-c-kernel copied to clipboard
ANSI C and flags
First of all, great project!
When using the cflag -ansi
, commenting by using //
can't be used so the code won't compile and standard error is produce.
The code for test:
//%cflags:-ansi -Wall -pedantic
#include <stdio.h>
int main()
{
printf("Hello, World!");
return 0;
}
The Error:
/tmp/tmpuzigbjpm.c:1:1: error: C++ style comments are not allowed in ISO C90
//%cflags:-ansi -Wall -pedantic
^
/tmp/tmpuzigbjpm.c:1:1: error: (this will be reported only once per input file)
[C kernel] GCC exited with code 1, the executable will not be executed
Screenshot for additional information:

Thanks!
Propose to fix this issue in - PR-56