www.digitalmars.com         C & C++   DMDScript  

c++.announce - New beta test compiler for SGI STL 3.3

reply "Walter" <walter digitalmars.com> writes:
Here's an experimental compiler for compiling the full STL 3.3 from SGI.

www.digitalmars.com/dmc/dmcppDownload.html
Oct 02 2001
next sibling parent reply Jan Knepper <jan smartsoft.cc> writes:
WOW!
That's actually a LOT of progress!
Will see how soon I can reserve some time to put the compiler through the
test.

Jan



Walter wrote:

 Here's an experimental compiler for compiling the full STL 3.3 from SGI.

 www.digitalmars.com/dmc/dmcppDownload.html
Oct 02 2001
parent reply Damian <damiandixon netscape.net> writes:
Walter,

Just downloading this newer version.

I am having a problem with 8.1e and my STLport regression tests, maybe 
this will fix the problem.

The problem is as follows and did not appear to occur before:

sc console.cpp -mn -C -WA -S -3 -a8 -c -gf -D_CONSOLE=1 
-ID:\CVS\STL\port\stlport -oconsole.obj
sc regression\string1.cpp -mn -C -WA -S -5 -a8 -c -gf -D_CONSOLE=1 
-ID:\CVS\STL\port\stlport -oregression\string1.obj
Error: D:\CVS\STL\port\test\regression\string1.cpp(20): ambiguous 
reference to symbol
D:\CVS\STL\port\test\regression\string1.cpp(20): Had: operator 
<<(ostream&,const basic_string&)
D:\CVS\STL\port\test\regression\string1.cpp(20): and: operator 
<<(ostream&,const basic_string&)
Error: D:\CVS\STL\port\test\regression\string1.cpp(28): ambiguous 
reference to symbol
D:\CVS\STL\port\test\regression\string1.cpp(28): Had: operator 
<<(ostream&,const basic_string&)
D:\CVS\STL\port\test\regression\string1.cpp(28): and: operator 
<<(ostream&,const basic_string&)
Lines Processed: 16543  Errors: 2  Warnings: 0
Build failed


I believe the problem relates to template declaration, and then later on 
the actual template definition occuring, for example:

-----------------------------------------------------------------
template<class T> void sort(vector<T>&);  // declaration

template<class T> void sort(vector<T>&v)  // definition
{
}
// The above defintion causes a problem if the declaration is also
// visible.
-----------------------------------------------------------------


I am using the tests in:

STL/port/compiler_tests/compiler_tests.prj
STL/port/test/console.prj

Note that the compiler tests are turned on and off by undef/define of 
settings in test_config.h. The tests are essentially the tests done by 
the configure script supplied with STLport (configure requires cygwin on 
NT).

Regards
Damian


Jan Knepper wrote:

 WOW!
 That's actually a LOT of progress!
 Will see how soon I can reserve some time to put the compiler through the
 test.
 
 Jan
 
 
 
 Walter wrote:
 
 
Here's an experimental compiler for compiling the full STL 3.3 from SGI.

www.digitalmars.com/dmc/dmcppDownload.html
Oct 03 2001
parent reply "Walter" <walter digitalmars.com> writes:
Try 8.1f and see if you get the same problem. -Walter

Damian wrote in message <3BBAC5E6.7020403 netscape.net>...
Walter,

Just downloading this newer version.

I am having a problem with 8.1e and my STLport regression tests, maybe
this will fix the problem.

The problem is as follows and did not appear to occur before:

sc console.cpp -mn -C -WA -S -3 -a8 -c -gf -D_CONSOLE=1
-ID:\CVS\STL\port\stlport -oconsole.obj
sc regression\string1.cpp -mn -C -WA -S -5 -a8 -c -gf -D_CONSOLE=1
-ID:\CVS\STL\port\stlport -oregression\string1.obj
Error: D:\CVS\STL\port\test\regression\string1.cpp(20): ambiguous
reference to symbol
D:\CVS\STL\port\test\regression\string1.cpp(20): Had: operator
<<(ostream&,const basic_string&)
D:\CVS\STL\port\test\regression\string1.cpp(20): and: operator
<<(ostream&,const basic_string&)
Error: D:\CVS\STL\port\test\regression\string1.cpp(28): ambiguous
reference to symbol
D:\CVS\STL\port\test\regression\string1.cpp(28): Had: operator
<<(ostream&,const basic_string&)
D:\CVS\STL\port\test\regression\string1.cpp(28): and: operator
<<(ostream&,const basic_string&)
Lines Processed: 16543  Errors: 2  Warnings: 0
Build failed


I believe the problem relates to template declaration, and then later on
the actual template definition occuring, for example:

-----------------------------------------------------------------
template<class T> void sort(vector<T>&);  // declaration

template<class T> void sort(vector<T>&v)  // definition
{
}
// The above defintion causes a problem if the declaration is also
// visible.
-----------------------------------------------------------------


I am using the tests in:

STL/port/compiler_tests/compiler_tests.prj
STL/port/test/console.prj

Note that the compiler tests are turned on and off by undef/define of
settings in test_config.h. The tests are essentially the tests done by
the configure script supplied with STLport (configure requires cygwin on
NT).

Regards
Damian


Jan Knepper wrote:

 WOW!
 That's actually a LOT of progress!
 Will see how soon I can reserve some time to put the compiler through the
 test.

 Jan



 Walter wrote:


Here's an experimental compiler for compiling the full STL 3.3 from SGI.

www.digitalmars.com/dmc/dmcppDownload.html
Oct 03 2001
parent reply Damian <damiandixon netscape.net> writes:
Walter,

The problem has been fixed with the new compiler.

A quick look at the results from the STLport regressions tests seems to 
give a thumbs up! I am using my old settings first, now I have to try 
the new settings to see if the new features, break anything or allow me 
to enable more of the library.

I am having fun trying to use the command line compiler.

Is there any chance of making available a compiler for the IDE? If not I 
can live with the command line.

Regards,
Damian

Walter wrote:

 Try 8.1f and see if you get the same problem. -Walter
 
 Damian wrote in message <3BBAC5E6.7020403 netscape.net>...
 
Walter,

Just downloading this newer version.

I am having a problem with 8.1e and my STLport regression tests, maybe
this will fix the problem.

The problem is as follows and did not appear to occur before:

sc console.cpp -mn -C -WA -S -3 -a8 -c -gf -D_CONSOLE=1
-ID:\CVS\STL\port\stlport -oconsole.obj
sc regression\string1.cpp -mn -C -WA -S -5 -a8 -c -gf -D_CONSOLE=1
-ID:\CVS\STL\port\stlport -oregression\string1.obj
Error: D:\CVS\STL\port\test\regression\string1.cpp(20): ambiguous
reference to symbol
D:\CVS\STL\port\test\regression\string1.cpp(20): Had: operator
<<(ostream&,const basic_string&)
D:\CVS\STL\port\test\regression\string1.cpp(20): and: operator
<<(ostream&,const basic_string&)
Error: D:\CVS\STL\port\test\regression\string1.cpp(28): ambiguous
reference to symbol
D:\CVS\STL\port\test\regression\string1.cpp(28): Had: operator
<<(ostream&,const basic_string&)
D:\CVS\STL\port\test\regression\string1.cpp(28): and: operator
<<(ostream&,const basic_string&)
Lines Processed: 16543  Errors: 2  Warnings: 0
Build failed


I believe the problem relates to template declaration, and then later on
the actual template definition occuring, for example:

-----------------------------------------------------------------
template<class T> void sort(vector<T>&);  // declaration

template<class T> void sort(vector<T>&v)  // definition
{
}
// The above defintion causes a problem if the declaration is also
// visible.
-----------------------------------------------------------------


I am using the tests in:

STL/port/compiler_tests/compiler_tests.prj
STL/port/test/console.prj

Note that the compiler tests are turned on and off by undef/define of
settings in test_config.h. The tests are essentially the tests done by
the configure script supplied with STLport (configure requires cygwin on
NT).

Regards
Damian


Jan Knepper wrote:


WOW!
That's actually a LOT of progress!
Will see how soon I can reserve some time to put the compiler through the
test.

Jan



Walter wrote:



Here's an experimental compiler for compiling the full STL 3.3 from SGI.

www.digitalmars.com/dmc/dmcppDownload.html
Oct 03 2001
parent "Walter" <walter digitalmars.com> writes:
That is good news!

Damian wrote in message <3BBB30A6.7000409 netscape.net>...
Walter,

The problem has been fixed with the new compiler.

A quick look at the results from the STLport regressions tests seems to
give a thumbs up! I am using my old settings first, now I have to try
the new settings to see if the new features, break anything or allow me
to enable more of the library.

I am having fun trying to use the command line compiler.

Is there any chance of making available a compiler for the IDE? If not I
can live with the command line.

Regards,
Damian

Walter wrote:

 Try 8.1f and see if you get the same problem. -Walter
Oct 03 2001
prev sibling next sibling parent reply Cesar Rabak <csrabak uol.com.br> writes:
Walter wrote:
 
 Here's an experimental compiler for compiling the full STL 3.3 from SGI.
 
 www.digitalmars.com/dmc/dmcppDownload.html
Walter, While I understand you're more involved in the design of D, did you ever considered featuring sc so it accepts (and work) the 'export' keyword. Besides easing the life of template implemementers it could make the DM compiler to be the first in world! just a suggestion. Cesar
Oct 03 2001
parent reply "Walter" <walter digitalmars.com> writes:
I know nobody implements export, I wonder who's idea it was. It doesn't fit
with the rest of the language. Realistically, though, I need to get
templates and namespaces up to speed first!

Cesar Rabak wrote in message <3BBB3F5A.AAE0F9C5 uol.com.br>...
Walter wrote:
 Here's an experimental compiler for compiling the full STL 3.3 from SGI.

 www.digitalmars.com/dmc/dmcppDownload.html
Walter, While I understand you're more involved in the design of D, did you ever considered featuring sc so it accepts (and work) the 'export' keyword. Besides easing the life of template implemementers it could make the DM compiler to be the first in world! just a suggestion. Cesar
Oct 03 2001
parent Cesar Rabak <csrabak uol.com.br> writes:
Walter wrote:
 
 I know nobody implements export, I wonder who's idea it was. It doesn't 
Me either, BTW! fit
 with the rest of the language. Realistically, though, I need to get
The whole idea stems from the wish to be able to separate the specification from the implementation. Right now, because we cannot 'export' you have to put implementation in you headers or not to use them at all...
 templates and namespaces up to speed first!
 
I see, we ought to have priorities ;-) thanks for the repply. Cesar
Oct 03 2001
prev sibling parent reply John Fletcher <J.P.Fletcher aston.ac.uk> writes:
Walter wrote:

 Here's an experimental compiler for compiling the full STL 3.3 from SGI.

 www.digitalmars.com/dmc/dmcppDownload.html
I did some tests on this last night. The STL doesn't come with a <string> definition so lots of my examples won't work. Is there one available for this? John
Oct 04 2001
next sibling parent reply John Fletcher <J.P.Fletcher aston.ac.uk> writes:
John Fletcher wrote:

 Walter wrote:

 Here's an experimental compiler for compiling the full STL 3.3 from SGI.

 www.digitalmars.com/dmc/dmcppDownload.html
I did some tests on this last night. The STL doesn't come with a <string> definition so lots of my examples won't work. Is there one available for this? John
Sorry, problem solved using a complete set of SGI STL 3.3 and then putting yours on top. Cheers John
Oct 04 2001
parent reply John Fletcher <J.P.Fletcher aston.ac.uk> writes:
With some further testing I am finding a problem which I also found with SGI STL
3.20 previously.

Consider the following function returning a string:

string Name(string a) {
    return a;
}

The conditional code assignment fails when the boolean value is false:
    bool test;
    string a = "a";
    test = false;
    // This fails for false and returns garbage in the string.
    string s = test ? "true" : Name(a).c_str();
    // This works for false.
    string s2 = test ? Name(a).c_str() : Name(a).c_str();
    // This works
    s = test ? string("true") : Name(a);
    // This works
    string t = test ? "true" : a.c_str    // This works
    string u;
    if (test) u = "true"; else u = Name(a).c_str();

I also need to define this to get termination of the strings:

#define __STL_DEFAULT_CONSTRUCTOR_BUG

Cheers

John
Oct 04 2001
next sibling parent John Fletcher <J.P.Fletcher aston.ac.uk> writes:
John Fletcher wrote:

 With some further testing I am finding a problem which I also found with SGI
STL
 3.20 previously.

 Consider the following function returning a string:

 string Name(string a) {
     return a;
 }

 The conditional code assignment fails when the boolean value is false:
     bool test;
     string a = "a";
     test = false;
     // This fails for false and returns garbage in the string.
     string s = test ? "true" : Name(a).c_str();
     // This works for false.
     string s2 = test ? Name(a).c_str() : Name(a).c_str();
     // This works
     s = test ? string("true") : Name(a);
     // This works
     string t = test ? "true" : a.c_str    // This works
Correction, the previous line should be: string t = test ? "true" : a.c_str(); // This works
     string u;
     if (test) u = "true"; else u = Name(a).c_str();

 I also need to define this to get termination of the strings:

 #define __STL_DEFAULT_CONSTRUCTOR_BUG

 Cheers

 John
I had better append a complete program file. John
Oct 04 2001
prev sibling parent reply "Walter" <walter digitalmars.com> writes:
"John Fletcher" <J.P.Fletcher aston.ac.uk> wrote in message
news:3BBC70E8.85314DDE aston.ac.uk...
 I also need to define this to get termination of the strings:

 #define __STL_DEFAULT_CONSTRUCTOR_BUG
I'd like a (small) test case demonstrating this is needed. Thanks!
Oct 04 2001
next sibling parent John Fletcher <J.P.Fletcher aston.ac.uk> writes:
Walter wrote:

 "John Fletcher" <J.P.Fletcher aston.ac.uk> wrote in message
 news:3BBC70E8.85314DDE aston.ac.uk...
 I also need to define this to get termination of the strings:

 #define __STL_DEFAULT_CONSTRUCTOR_BUG
I'd like a (small) test case demonstrating this is needed. Thanks!
I'll try again with your latest distribution. If there is still a problem I'll do an example. John
Oct 05 2001
prev sibling parent reply John Fletcher <J.P.Fletcher aston.ac.uk> writes:
Walter wrote:

 "John Fletcher" <J.P.Fletcher aston.ac.uk> wrote in message
 news:3BBC70E8.85314DDE aston.ac.uk...
 I also need to define this to get termination of the strings:

 #define __STL_DEFAULT_CONSTRUCTOR_BUG
I'd like a (small) test case demonstrating this is needed. Thanks!
Walter Here is a small case which gives different output with and without the define. The outputs I get are in a comment in the program. Compilation in the directory with the SGI 3.3 is sc -I. onestr.cpp. John
Oct 05 2001
parent "Walter" <walter digitalmars.com> writes:
thanks!

"John Fletcher" <J.P.Fletcher aston.ac.uk> wrote in message
news:3BBD9F8A.EBE21BF7 aston.ac.uk...
 Walter wrote:

 "John Fletcher" <J.P.Fletcher aston.ac.uk> wrote in message
 news:3BBC70E8.85314DDE aston.ac.uk...
 I also need to define this to get termination of the strings:

 #define __STL_DEFAULT_CONSTRUCTOR_BUG
I'd like a (small) test case demonstrating this is needed. Thanks!
Walter Here is a small case which gives different output with and without the define. The outputs I get are in a comment in the program. Compilation in the directory with the SGI 3.3 is sc -I. onestr.cpp. John
Oct 05 2001
prev sibling parent "Walter" <walter digitalmars.com> writes:
John Fletcher wrote in message <3BBC3F1B.EC73345C aston.ac.uk>...
Walter wrote:
 Here's an experimental compiler for compiling the full STL 3.3 from SGI.

 www.digitalmars.com/dmc/dmcppDownload.html
I did some tests on this last night. The STL doesn't come with a <string> definition so lots of my examples won't work. Is there one available for this?
Oops. The files with no extension didn't make it into the zip file. I fixed it, try downloading it again.
Oct 04 2001