This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

No Subject


Hi!
I found a very special effect in EGCS 1.0.2. for CYGWIN b19 on NT4.0.

Such a code:
/*************************************/
#include <stdio.h>
#include <stdlib.h>
main()
{
	char buf;
    buf='\13';
    printf ("Char value is %3i",(int)buf);	
    return 0;
}
/*************************************/

gives :
Char value is  11

All conversions with '\nnn' works in such a strange way.
Another unconvinient thing is that gets() leaves \13 before
end zero. Of course, we can treat only \10 as end-of-line,
but it makes some problems when reading Win/Dos texts...

                With best regards, 
                                Alexander.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]