This is the mail archive of the gcc-bugs@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]
Other format: [Raw text]

[Bug c++/26604] primitive type initialisation in array allocation



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-03-08 12:50 -------
This "works" for me by rejecting with -Wall -ansi:
pc64:~> ~/gcc-4.0/bin/gcc t2.cc -W -Wall -ansi
t2.cc:3: warning: unused parameter ?i?
t2.cc: In function ?int main()?:
t2.cc:7: error: ISO C++ forbids initialization in array new
t2.cc:8: error: ISO C++ forbids initialization in array new
t2.cc:7: warning: unused variable ?a?
t2.cc:8: warning: unused variable ?p?
pc64:~> ~/gcc-4.1/bin/gcc t2.cc -W -Wall -ansi
t2.cc:3: warning: unused parameter ?i?
t2.cc: In function ?int main()?:
t2.cc:7: error: ISO C++ forbids initialization in array new
t2.cc:8: error: ISO C++ forbids initialization in array new
t2.cc:7: warning: unused variable ?a?
t2.cc:8: warning: unused variable ?p?
pc64:~> ~/checkin/bin/gcc t2.cc -W -Wall -ansi
t2.cc:3: warning: unused parameter ?i?
t2.cc: In function ?int main()?:
t2.cc:7: error: ISO C++ forbids initialization in array new
t2.cc:8: error: ISO C++ forbids initialization in array new
t2.cc:7: warning: unused variable ?a?
t2.cc:8: warning: unused variable ?p?
-------------
What is the output of "gcc -v"?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26604


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