delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/23/11:50:35

From: kagel AT quasar DOT bloomberg DOT com
Date: Thu, 23 Jan 1997 11:32:17 -0500
Message-Id: <9701231632.AA07111@quasar.bloomberg.com >
To: kkunen AT facstaff DOT wisc DOT edu
Cc: djgpp AT delorie DOT com
In-Reply-To: <199701220247.UAA37718@audumla.students.wisc.edu> (kkunen@facstaff.wisc.edu)
Subject: Re: Bug report: Structs
Reply-To: kagel AT dg1 DOT bloomberg DOT com

   Errors-To: postmaster AT ns1
   Date: Tue, 21 Jan 1997 20:47:31 -0600
   X-Sender: kkunen AT facstaff DOT wisc DOT edu
   Mime-Version: 1.0
   From: kkunen AT facstaff DOT wisc DOT edu (Adam Kunen)
   X-Mailer: <PC Eudora Version 1.4>
   Content-Type: text/plain; charset="us-ascii"
   Content-Length: 930

	   I think this is the right address for bug reports on DOS port of GNU 
   C... But anyway, I was using GNU C and found that when you have a structure 
   bigger than 64k it tends to crash.  Although I havn't spent time to pinpoint 
   exactly what is causing the problem, I beleive that it crashes when you make 
   a function call with a large structure as an argument.  I assume that doing 
   this is okay because gcc doesn't report any warnings or errors, so I've come 
   to the conclusion: It's a bug!
	   I hope this helps,
			   Adam Kunen,
			   kkunen AT facstaff DOT wisc DOT edu




   PS: I was told to give an example code file to illustrate the problem:

   struct FooType {
	   char blah[1024][128];
   };

   void foobar(struct FooType ptr){
	   return;
   }

   int main(void){
	   struct FooType eek;
	   foobar(eek);

Here is the problem you declare foobar to receive a 'pointer to struct FooType'
and then pass a 'struct FooType' to it.  Make the previous line:

     foobar( &eek );

And all will be well.


	   return 0;
   }



- Raw text -


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