This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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


Jason Merrill <jason@redhat.com> writes:

| >>>>> "Gabriel" == Gabriel Dos Reis <gdr@codesourcery.com> writes:
| 
| > | > 	// 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.
| 
| > You get a link-time error if mblen() has a C++ linkage -- that is one
| > of the reasons why we want all C-funtions to have C linkage.
| 
| Why?  The C code would still call the C mblen.

Which doesn't exist either since the conditions are that we _don't_
have a mblen() function, but just a macro -- having just a macro is the
deficieny of target we're trying to solve.

-- Gaby
CodeSourcery, LLC                       http://www.codesourcery.com

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