Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#2 multi string printf not printed correctly

closed-fixed
5
2008-08-13
2008-07-22
No

the following printf on the simulator does not print the last line (...shape = circle...)

printf("digraph suffix_tree {\n\tsize=\'5,8\';\n\trankdir=\'TB\';\n\t"
"node [shape = doublecircle]; \'n%d,%dpq%d\';\n\t"
"node [shape = circle];\n", 1,2,3);

Discussion

  •  
    Attachments
  • Logged In: YES
    user_id=2131513
    Originator: YES

    The problem seems to occur because of the 3 strings, not the complex formatting in the 3 strings. GCC produces three consecutive .ascii directives under one assembly label. The default compiler and simulator behavior is to align .ascii directives on 32 bit (4 byte, 1 word) boundaries.

    Actually the best way to fix this is to have a compiler pass that merges consecutive .ascii directives with no labels in between.

     
    • assigned_to: kecelifu --> tzannes
     
    • labels: 1128135 --> compiler-prefetch
    • status: open --> closed-fixed
     
  • Logged In: YES
    user_id=2131513
    Originator: YES

    Added compiler pass that merges consecutive .ascii directives before converting the file to binary