This is the mail archive of the gcc@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]

g++ and stdout strangeness


Hi folks,

I have the following curious behaviour (on my linux/alpha box):
$ gcc -v
Reading specs from /usr/lib/gcc-lib/alpha-redhat-linux/2.97/specs
Configured with: ../gcc/configure --prefix=/usr --enable-shared --enable-threads alpha-redhat-linux
gcc version 2.97 20001128 (experimental)

This simple hello world program:
$ cat toto.cc
#include <stdio.h>
int main()
{
    printf("Hello world.\n");
}

Compiled with g++:
$ g++ -o toto toto.cc 

Appears to work when called as:
$ ./toto 
Hello world.

But refuses to redirect its output:
$ ./toto >out
$ cat out 
$ ls -l out
-rw-r--r--   1 chris    wheel           0 Nov 28 18:18 out

All this with the current GCC from CVS...

The same code compiled as C works as expected.
My glibc is 2.2, and binutils is 2.10.91...

Anybody else can repeat this ?

Cheers,
					Christian



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