This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Typedef problem
- To: egcs-bugs at egcs dot cygnus dot com
- Subject: Typedef problem
- From: Alexander Zvyagin <zvyagin at mx dot ihep dot su>
- Date: Mon, 03 May 1999 14:31:46 GMT+03:00
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