Hello,

I see that mico redefines assert macro with something specific. I hope
I'm missing something, but I don't think this should be done, because
it can lead to One Definition Rule violations, which causes undefined
behavior.
For example:

-- a.h --

inline void foo(int x)
{
  assert(x != 0);
}

-- a.cpp --

#include "a.h"

void bar()
{
  foo(1);
}

-- b.cpp --

#include <CORBA.h>
#include "a.h"

void my_bar()
{
  foo(1);
}

-- --

And we have multiple implementations of foo which are different after
preprocessing.
Also, I don't see why mico should have the responsability to address
assert's for code outside its own.
If mico wants to optimize its assertions, it should define a
MICO_ASSERT macro that does whatever it wants it to do.


Regards,
-- 
Felipe Magno de Almeida

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Mico-devel mailing list
Mico-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mico-devel

Reply via email to