Mail Archives: djgpp/1995/07/24/03:13:55
Subject: bug in p2c (pascal to C converter) with Turbo Option
After several trials, due to spurious hangups in a TurboPascal
converted to C with p2c (version 1.21a2), I find out that the
concatenation of one string A to another B, namely:
A:=A+B;
is sometimes translated in C as:
sprintf(A,"some format with %s",B);
and sometimes with the strcat(...) procedure. And I find out
that the truncation posted in TurboPascal's doc, truncation
to the size of the target string, is not done with these C
procedures. And the result is overwriting other variables or
instructions which have nothing to see with the current
instruction.
Questions:
==========
1. am I right, or is my knowledge of C too poor?
2. did somebody experience these problems?
3. has somebody made a correction to the p2c converter?
Daniel TAUPIN - taupin AT lps DOT u-psud DOT fr
Please answer directly, not to the lists from which I'm
likely to be unsubscribed.
- Raw text -