This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: GCC 4.1.2 RC2


Richard Henderson wrote:
> On Mon, Feb 12, 2007 at 10:06:11AM -0800, Mark Mitchell wrote:
>> Does it seem overly aggressive to you to assume "f" cannot throw
>> in "g", given:
>>
>>   void f() {}
>>   void g() { f(); }
>>
>> where this code is in a shared library?
> 
> Yes.
> 
> If F is part of the exported (and overridable) interface of
> the shared library, one should be able to replace it with
> any valid function.

I understand that people do this for C code (e.g., replace memcpy, or
other bits of the C library).  Those routines aren't generally
manipulating global data; they're often stand-alone APIs that just
happened to be grouped together into a single library.

But, aren't big C++ shared libraries rather different?  Does KDE
actually use throw() everywhere, or visibility attributes?  But,
presumably, most people don't replace the implementation of
ScrollBar::ScrollUp or whatever.  I'd be happy to know I'm wrong here,
but I'd be surprised if there aren't large amounts of legacy code that
would be hurt by this change.  Do you disagree?

Thanks,

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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