From: pavenis AT lanet DOT lv Message-ID: To: djgpp AT delorie DOT com, "Aleksey Kondratyev" Date: Thu, 4 Jun 1998 11:35:50 +0300 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: DJGPP 2.8.0 labels as values problem In-reply-to: <6l5h74$jio$1@simtel.ru> Precedence: bulk From: "Aleksey Kondratyev" Subject: DJGPP 2.8.0 labels as values problem Date sent: Thu, 4 Jun 1998 11:05:12 +0400 > Hello DJGPP users, > > I have a problem using labels as values gcc extension > in a c++ module. The following sample was compiled > fine by DJGPP 2.7.2.1but 2.8.0 version complains on > "Error: sorry, not implemented: initializer contains > unrecognized tree code". Looks that it works with 2.7.2.1 but gives message You mentioned above with 2.8.1. If such code is really needed then perhaps You should currently use 2.7.2.1. The second thing You should do is to send bug report about gcc (see info files how to do this) > > #include > #define ADD 0 > #define SUB 1 > template > T do_it(T a,T b,int op) { > static void *oops[]={&&op_add,&&op_sub}; > goto *oops[(const int)op]; > op_add: > return a+b; > op_sub: > return a-b; > } > int main() { > cout< return 0; > } > > It is compiled fine without 'templates' but avoiding > of a template in my real module is quite difficult. > Please, suggest something! > E.g., is it be possible to declare labels in g++ > beforehand? >