Comiler bug in printf( ?
Posted: Tue Jun 14, 2016 9:31 am
I had been working on a project on Eclipse Arduino V3 but I think everybody uses the same compiler.
Because I am developing parts of code I'm working on is festooned with printf statements. From time to time, those printfs are flat out ignored: I know the code is being executed but the text never makes its way to the screen.
Last night I had a statement
printf("%s", message);
which refused to work. I know the message was OK because I printed it earlier. Changing the statement to
printf(" %s", message); //note the leading space
made the exact code work fine.
This is sporadic and I don't have any examples to share at the moment. Because my project is pretty big (> 1000 lines) I suspect the total project is more significant than the actual statement. (i.e. maybe there is a page crossing or word crossing issue somewhere).
I just figured I'd mention it.
Because I am developing parts of code I'm working on is festooned with printf statements. From time to time, those printfs are flat out ignored: I know the code is being executed but the text never makes its way to the screen.
Last night I had a statement
printf("%s", message);
which refused to work. I know the message was OK because I printed it earlier. Changing the statement to
printf(" %s", message); //note the leading space
made the exact code work fine.
This is sporadic and I don't have any examples to share at the moment. Because my project is pretty big (> 1000 lines) I suspect the total project is more significant than the actual statement. (i.e. maybe there is a page crossing or word crossing issue somewhere).
I just figured I'd mention it.