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]

Re: ctor fails: vector<int>(size_type, int)



>   Date: Mon, 6 Oct 1997 21:11:20 GMT
>   From: Mark Mitchell <mmitchell@usa.net>
>   Cc: egcs-bugs@cygnus.com
>   Reply-To: mmitchell@usa.net
>
>   >>>>> "Yotam" == Yotam Medini <yotamm@tmai.com> writes:
>
>       Yotam> // Using the 'old' 970924 snapshot.
>
>   This bug has alread been fixed.  For the fix, see:
>
>   http://www.cygnus.com/ml/egcs/1997-Oct/0162.html
>
>   By the way, your code is illegal, as explained in the above message. :-(
>
>       Yotam> The following tiny example says it all:
>
>       Yotam> telaviv:522> egcs++ -v Reading specs from
>       Yotam> ...
>       Yotam> gcc version egcs-2.90.10 970924 (gcc2-970802 experimental)
>       Yotam> telaviv:523> cat vint.cc #include<vector> void f() {
>       Yotam> vector<int> viSZTP((vector<int>::size_type)1, 13); #if
>       Yotam> !defined(SKIPVI) vector<int> vi(1, 13); #endif }
>       Yotam> telaviv:524> egcs++ -c vint.cc
>       Yotam> /home/seg/yotam/build/dryinst.Solaris/include/g++/vector.h:103:
>       Yotam> Internal compiler error 97.
>       Yotam> /home/seg/yotam/build/dryinst.Solaris/include/g++/vector.h:103:
>       Yotam> Please submit a full bug report to `egcs-bugs@cygnus.com'.
>       Yotam> ...
>
>   Mark Mitchell		mmitchell@usa.net
>   Stanford University	http://www.stanford.edu

Thanks for the educated answer.
In that http://www.cygnus.com/ml/egcs/1997-Oct/0162.html the suggested 
style is    
            vector v((size_t) 3, 5);
Is 'size_t' definition guaranteed to be included by  #include <vector> ?
-- yotam


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