illegal assembly code generated by egcs-1.0.1 on AIX 3.2

Mark Mitchell mmitchell@usa.net
Wed Jan 7 09:30:00 GMT 1998


>>>>> "Mark" == Mark Johnstone <markj@ibmoto.com> writes:

    Mark> Hello,

    Mark> When compiling the following files, a control character
    Mark> incorrectly gets put into the asserbler (.s) file generated
    Mark> by egcs 1.0.1:

    Mark> test.h:

    Mark> #include<iostream.h>

    Mark> struct test_box { void print(void) {cout << "this is a test"
    Mark> << endl;} };

    Mark> void test<class BOX> (test_box *);


As with your earlier bug report, my changes cause (correctly) an error to be
reported here:

supernova% test-g++ -c -fno-implicit-templates test.cc
In file included from test.cc:1:
test.h:8: explicit specialization not preceded by `template <>'

so there is no error at assembly-time.

    Mark> test.C:

    Mark> #include "test.h"

    Mark> template <class BOX> void test(BOX *the_box) {
    the_box-> print();
    Mark>     };

    Mark> template void test<> (test_box *);


    Mark> main.C:

    Mark> #include "test.h"

    Mark> main() { test_box box1; test(&box1); }

-- 
Mark Mitchell		mmitchell@usa.net
Stanford University	http://www.stanford.edu




More information about the Gcc-bugs mailing list