Re: [BUG] gcc-3.4.5-20050531 (i386): __FUNCTION__ as a part of the printf's format argument

2005-07-25 Thread Denis Zaitsev
On Mon, Jul 25, 2005 at 11:35:27AM +0200, Paolo Bonzini wrote: > > Ok, but such a code used to be compiled succesively with gcc for > > years. Then, some change _in_ gcc has occured. That is why I've > > posted to here. > > Yes, it was deprecated in 3.1 (released three years ago) and removed in

Re: [BUG] gcc-3.4.5-20050531 (i386): __FUNCTION__ as a part of the printf's format argument

2005-07-25 Thread Denis Zaitsev
On Mon, Jul 25, 2005 at 10:51:23AM +0200, Richard Guenther wrote: > On 7/25/05, Denis Zaitsev <[EMAIL PROTECTED]> wrote: > > Such an example can't be compiled: > > > > > > #include > > > > void x() > > { > > printf(__F

[BUG] gcc-3.4.5-20050531 (i386): __FUNCTION__ as a part of the printf's format argument

2005-07-25 Thread Denis Zaitsev
Such an example can't be compiled: #include void x() { printf(__FUNCTION__ "\n"); } $ gcc printf.c -o fprintf printf.c: In function `x': printf.c:5: error: syntax error before string constant Then, the problem is not printf-specific and is not depend of . The next example gives the sam

gcc-3.4.4-20050211: maybe a danger behaviour

2005-02-26 Thread Denis Zaitsev
Consider the following example: enum w { //c=-1, a, b }; whattodo ( char option ) { static struct todo { enum w what; char option; } todos[]= { {a,'a'}, {b,'b'}, {-1} }; struct todo *p= todos; do if ( (option