Opened 10 years ago
Closed 10 years ago
#3166 closed defect (fixed)
Treatment of multiline strings with DOS line endings
Reported by: | Rüdiger Franke | Owned by: | Martin Sjölund |
---|---|---|---|
Priority: | normal | Milestone: | 1.9.2 |
Component: | Code Generation | Version: | trunk |
Keywords: | Cc: |
Description
The following model contains a multiline doc string:
within ; model MultiLineEncodingDOS "This is a doc string with embedded DOS line ending" Modelica.Blocks.Interfaces.RealInput Pin(start=2.7076e6); Modelica.Blocks.Interfaces.RealOutput Pout; equation connect(Pin, Pout); end MultiLineEncodingDOS;
Saving it with DOS line endings (see attached MultiLineEncodingDOS.mo
) and opening it under Linux, the parser keeps the DOS line ending in the multiline doc string. This causes C compiler errors later on -- OMEdit (r24644) FMI --> Export FMU raises the error:
[1] 06:02:02 Translation Error Error building simulator. Build log: clang -fPIC -O0 -march=native -I"/usr/include/omc/c" -I"/usr/include/omc/c/fmi2" -I. -c -o MultiLineEncodingDOS_FMU.o MultiLineEncodingDOS_FMU.c clang -fPIC -O0 -march=native -I"/usr/include/omc/c" -I"/usr/include/omc/c/fmi2" -I. -c -o MultiLineEncodingDOS.o MultiLineEncodingDOS.c In file included from MultiLineEncodingDOS.c:227: ./MultiLineEncodingDOS_init.c:1:1: warning: missing terminating '"' character [-Winvalid-pp-token] "\n\n\n: recipe for target 'MultiLineEncodingDOS.o' failed make: *** [MultiLineEncodingDOS.o] Error 1
See also ticket:3151#comment:4
Attachments (1)
Change History (3)
by , 10 years ago
Attachment: | MultilineEncodingDOS.mo added |
---|
comment:1 by , 10 years ago
Status: | new → accepted |
---|
comment:2 by , 10 years ago
Component: | Parser → Code Generation |
---|---|
Resolution: | → fixed |
Status: | accepted → closed |
Note:
See TracTickets
for help on using tickets.
Fixed in r24645.