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: g++ 3.1 EH broken for irix6.5


On 04-Aug-2037, Richard Kenner, GNU C Maintainer <kenner@vlsi1.ultra.nyu.edu> wrote:
>     It is not a question of what the SVR4 ABI specifies -- it a question
>     of what we have already done.  If we change this, we have changed
>     the meaning of programs written to work with GCC.  
> 
> Yes, but that only matters if the programs are using features they are
> entitled to use based on documentation.

If any programs use packed structs (or structs containing packed structs)
in binary interfaces, then we can't change their representation without
breaking binary compatibility.

I suspect there is a good chance that packed structs are used with
fwrite() in quite a few programs.  These programs don't necessarily depend
on the exact alignment or representation, so they are not relying on
any feature that the GCC manual doesn't guarantee, they just depend (for
compatibility with existing data files) on that alignment not changing.

I wouldn't recommend that programming practice, since such data files
are implementation-specific; but on the other hand, I wouldn't recommend
changing GCC's ABI (and thus breaking such programs) either, unless
there is a very strong justification.

> There are many programs out
> there that are erroneous and rely on things GCC doesn't guarantee:
> such as assuming specific registers get allocated for variables and 
> used in an asm.  If we change the optimizer, we can "change the meaning
> of programs written to work with GCC".

Changing the ABI is different, because programmers often rely on the ABI not
changing without relying on any of the details of exactly what that ABI is.

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.


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