Typedef problem

Alexander Zvyagin zvyagin@mx.ihep.su
Mon May 3 03:31:00 GMT 1999


Date: Mon, 3 May 1999 14:31:44 +0000
From: ZVYAGIN <ZVYAGIN@mx.ihep.su>
X-Sender: ZVYAGIN@polar.ihep.su
To: egcs-bugs@egcs.cygnus.com
Subject: Typedef problem
Message-ID: <Pine.VMS.3.91-b11-vms.990503132412.570A-100000@polar.ihep.su>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

Dear egcs developers,

I'm not sure that this is bug, but I belive that the code is correct:

File b.c:
typedef char CHAR;
void f1(char *s="");  // ok.
void f2(CHAR *s="");  // error!

$ g++ -c b.c
b.c:3: default argument for `CHAR * s' has type `const char[1]'

$ g++ -v
Reading specs from 
/usr/local/lib/gcc-lib/i686-pc-linux-gnulibc1/egcs-2.93.20/specs
gcc version egcs-2.93.20 19990427 (gcc2 ss-980929 experimental)

$ uname -a
Linux gamspc5 2.2.2 #13 SMP Sat Mar 20 19:57:56 MSK 1999 i686 unknown

With best wishes,
Alexander Zvyagin


More information about the Gcc-bugs mailing list