GCC 2.95.2, Next 3.3; constructor not allowed as value

James McKelvey mckelvey@fafnir.com
Sun Feb 13 16:49:00 GMT 2000


 GCC 2.95.2

Next Cube running NextSTEP 4.2, 3.3 Developer

fafnir:PM>g++ -o x --save-temps x.cc                                        
x.cc: In function `int main()':
x.cc:48: type specifier omitted for parameter

In this block of code, the declaration of set 2 is
accepted, but the declaration of set 3 is not.

    const string r("1");
    const string i("1");
    const Scalar sr(r);
    const Set set2(sr, i);
    const Set set3(Scalar(r), i);

If the second argument is eliminated, there is no error.

Full source of example:

891062_x.ii.bz2


---
Where diesel guitars from faraway bars, blast out the
best songs from our holy wars. Coyote carnival catches
on fire, all the cops in the world pick us up on radar.
Jim McKelvey  mckelvey@fafnir.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 891062_x.ii.bz2
Type: application/x-bzip2
Size: 16138 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20000213/0b695269/attachment.bz2>


More information about the Gcc-bugs mailing list