From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Martin v. Loewis" To: hijaszu@mail.novo-iram.hu Cc: bug-gcc@gnu.org, bug-g++@gnu.org, bug-lib-g++@gnu.org, egcs-bugs@cygnus.com Subject: Re: Bug report Date: Thu, 04 Nov 1999 14:13:00 -0000 Message-id: <199911042206.XAA18736@mira.isdn.cs.tu-berlin.de> References: <3821DCEC.F2F951C6@mail.novo-iram.hu> X-SW-Source: 1999-11/msg00164.html List-Id: > Sorry I'm not sure to which address to send this > > version: gcc version 2.7.2.3 > compiler invocation: g++ dirlist.cpp > machine type: iP133 > operating system: DEBIAN GNU Linux - Slink 2.1 Thanks for your bug report. The right address for GCC bug reports these days is gcc-bugs@gcc.gnu.org. You were missing some information in your report, specifically: What is the bug? I don't have g++ 2.7.2 anymore, so I tried g++ 2.95. It says dirlist.cpp: In method `void TDirectoryList::readItems(int)': dirlist.cpp:150: invalid use of type decl `typedef __mode_t mode_t' as expression dirlist.cpp:153: `ffblk' undeclared (first use this function) dirlist.cpp:153: (Each undeclared identifier is reported only once dirlist.cpp:153: for each function it appears in.) dirlist.cpp:155: implicit declaration of function `int strlwr(...)' which I believe are all valid complaints. Please understand that gcc 2.7 has been superceded, so there won't be any more compiler releases in that series. I strongly recommend to upgrade. Regards, Martin >>From martin@mira.isdn.cs.tu-berlin.de Thu Nov 04 14:17:00 1999 From: "Martin v. Loewis" To: zvyagin@gams.ihep.su Cc: gcc-bugs@gcc.gnu.org, oliva@lsd.ic.unicamp.br, nathan@cs.bris.ac.uk Subject: Re: Initialization with new[] Date: Thu, 04 Nov 1999 14:17:00 -0000 Message-id: <199911042215.XAA22417@mira.isdn.cs.tu-berlin.de> References: X-SW-Source: 1999-11/msg00165.html Content-length: 734 > I thought that 'new T[n] (arg list)' was gcc extension (useful!). I read > that there are only technical limitations on using this synatx. Is it > right? I think this is the case. gcc -pedantic says, on Alexey's revised example: a.cc:11: warning: ANSI C++ forbids declaration `main' with no type a.cc: In function `int main()': a.cc:12: warning: initialization in array new a.cc:15: warning: initialization in array new I question whether that extension is particularly useful, though. Especially in the case of an integer array, there is a clean standard-conforming solution: write a loop, assigning each element. It is absolutely portable, and it is as efficient as anything the compiler could come up with. Regards, Martin