This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Prevent macro expansion of mblen


On Dec 30, 2000, Gabriel Dos Reis <gdr@codesourcery.com> wrote:

> 	// file a.c coming from a "C"-program
> 	#include <stddef.h>
> 	void f() { extern int mblen(const char*, size_t); // ...  }

This, by itself, will miscompile if mblen is #defined.

> 	// file b.C part of a "C++"-program
> 	#include <cstdlib>
> 	extern "C" void f();
> 	void g() { f(); }

> We need a way to make the call to f() work.  Do you see what I'm
> trying to say?

Nope.  I really don't see why f() wouldn't work.  It seems to me it
would work just fine.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]