delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/01/29/07:13:21

Date: Mon, 29 Jan 1996 13:51:34 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Andy Molyneux <molyneua AT cs DOT man DOT ac DOT uk>
Cc: djgpp AT delorie DOT com
Subject: Re: Compiler abort!

On Mon, 29 Jan 1996, Andy Molyneux wrote:

> The following short fragment of code causes GCC 2.6.3 (as supplied with 
> DJGPP V2 beta3) to "Abort!" with the following command line:

This bug doesn't happen in GCC 2.7.2 (in the next beta), so don't bother 
reporting it to FSF.

> If this is a bug, please consider it reported (!). Otherwise, can anyone 
> suggest what might be wrong with this code which could have caused it?

Nothing's really wrong, except that it's a no-op: it changes structures
passed by value, so the calling program won't ever see the change.  My 
guess is GCC sees this and tries to optimize out most of the code, which 
makes some of its parse tree invalid later.

If you want to change the structure *and* have it changed in the calling 
subprogram, pass a pointer to that structure.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019