Skip to content

Cannot use quotes in comments in annotations

ID0001800: This issue was created automatically from Mantis Issue 1800. Further discussion may take place here.


Id Project Category View Due Date Updated
ID0001800 Frama-C Kernel public 2014-06-05 2014-06-06
Reporter Ian Assigned To virgile Resolution open
Priority normal Severity minor Reproducibility always
Platform - OS Ubuntu OS Version -
Product Version Frama-C Neon-20140301 Target Version - Fixed in Version -

Description :

When using the //@ annotations, a comment at the end that has an unmatched ' or " causes the kernel to report an error.

Steps To Reproduce :

create file comment_parse.c: void f(){ //@assert \true;// Validates in 0'0" }

Run: frama-c -cpp-command 'gcc -C -E' -pp-annot comment_parse.c

Receive output: [kernel] preprocessing with "gcc -C -E -dD comment_parse.c" "comment_parse.c":5:[kernel] user error: Can't preprocess annotation: eof while parsing a char literal Annotation will be kept as is comment_parse.c:3:[kernel] user error: syntax error [kernel] user error: skipping file "comment_parse.c" that has errors. [kernel] Frama-C aborted: invalid user input.

Removing the ' and " characters will cause no error to occur.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information