[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mico-announce
Subject:    [mico-devel] Re: Exceptions handling
From:       Federico Munerotto <mune () ieee ! org>
Date:       2004-01-23 21:12:12
Message-ID: 40118E2C.70002 () ieee ! org
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Federico Munerotto wrote:
| I'm compiling Mico on a uClibc chrooted environment; the configure
| correctly detects that exceptions are unavaible, compiler works with the
| flag -f no-exceptin, but all the exceptions clauses, i.e. try, arent't
| enclosed in #ifdef EXCEPTION ...code... #endif. So the source code has a
| bug.
|
|
I've been able to isolate the problem:

[root@yose test]# gcc  -lstdc++ -fno-exceptions -otest_no test_no.cpp
test_no.cpp: In function `int main()':
test_no.cpp:12: error: `a' undeclared (first use this function)
test_no.cpp:12: error: (Each undeclared identifier is reported only once for
~   each function it appears in.)
[root@yose test]# gcc  -lstdc++ -otest_no test_no.cpp
[root@yose test]#

Where test_no has the source:
- ---------8<---------8---------8<---------8<---------8<---------8<---------
// test_no.cpp
#include <iostream>
#include <string>
using namespace std;

int main()
{
~  cout << "Hello world 1" << endl;
~  try {
~    cout << "Hello world 2" << endl;
~  }
~  catch (int a) {
~    a = 10;
~  }

~  return 0;
}
- ---------8<---------8---------8<---------8<---------8<---------8<---------

As you saw uClibc DOES exception handling so the problem is in the Mico
Configure which disables exception handling making the Makefile calling
the compiler with the "-fno-exceptions" flag.

PS I was working in a chrooted uClibc environment
- --
Fede
- -------------------------------------------------------------------------
~         mune at ieee.org            Ing. Federico Munerotto
~   home    http://www.krl.it/~mune
public key http://www.keyserver.net
- -------------------------------------------------------------------------
Don't tell any big lies today.  Small ones can be just as effective.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFAEY4s04XEGMGtpgARAhxzAKChWr7yOp+5mmSP2oCRfEk4ePlCGwCeNJLP
ovFS8nakZX/kOclVdmKzGfw=
=urJP
-----END PGP SIGNATURE-----

_______________________________________________
Mico-devel mailing list
Mico-devel@mico.org
http://www.mico.org/mailman/listinfo/mico-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic