Frama-C Bug Tracking System

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001467Frama-CKernelpublic2013-08-07 14:122017-05-04 15:55
Assigned Tovalentin.perrelle 
PlatformOSOS Version
Product VersionFrama-C Fluorine-20130601 
Target VersionFixed in Version 
Summary0001467: Parser does not handle mixed concatenations of wide and non-wide strings
Description~/ppc $ cat tests/misc/wstring_phase6.i
/* run.config
   OPT: -journal-disable -print

// See [^]
printf( "%s\n", "123" "456" );
printf( "%ls\n", L"123" L"456" );
printf( "%ls\n", "123" L"456" );
printf( "%ls\n", L"123" "456" );
printf( "%ls\n", L"123" L"456" );
~/ppc $ bin/toplevel.opt -print tests/misc/wstring_phase6.i
tests/misc/wstring_phase6.i:9:[kernel] user error: syntax error
[kernel] user error: skipping file "tests/misc/wstring_phase6.i" that has errors.
[kernel] Frama-C aborted: invalid user input.
~/ppc $
Additional InformationAs commented in the test, the behavior is defined and is explained in [^]
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
yakobowski (manager)
2013-09-07 11:20

There is already a comment to that effect in cil/src/front/clexer.mll. Search for "matth: BUG: this could be either a regular string or a wide string.". Fixing the lexer does not seem easy.

Fixing the parser is also complicated. The productions for wstring_list and string_list do not have the same type, so it is not possible to switch from a non-wide string to a wide one when we finally notice a L. And inside an LALR(1) parser, we cannot look at the token stream to see if an L is coming.

- Issue History
Date Modified Username Field Change
2013-08-07 14:12 pascal New Issue
2013-09-07 11:20 yakobowski Note Added: 0004064
2013-09-07 11:20 yakobowski Assigned To => pascal
2013-09-07 11:20 yakobowski Severity trivial => feature
2013-09-07 11:20 yakobowski Status new => assigned
2013-09-07 11:20 yakobowski Additional Information Updated
2013-09-09 14:19 svn Checkin
2016-07-05 17:34 yakobowski Assigned To pascal =>
2016-07-05 17:34 yakobowski Status assigned => confirmed
2017-05-04 15:55 yakobowski Assigned To => valentin.perrelle
2017-05-04 15:55 yakobowski Status confirmed => assigned

Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker