public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: "Lewin A.R.W. Edwards" <larwe@larwe.com>
To: ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] How to stop gcc padding structs???
Date: Sun, 28 Jan 2001 13:34:00 -0000	[thread overview]
Message-ID: <4.3.2.7.2.20010128163342.00b0e430@larwe.com> (raw)

>I'm again fighting with gcc trying (and failing) to get it to
>stop putting padding bytes into structs.  Have any eCosians
>figured out how to prevent gcc from padding structs?

I have had the same type of problem trying to get it working on a 
structure-by-structure basis and I am running with the entire OS compiled 
with packed structures.

Warning!!!! am not sure if it is caused by this act, but I have run into 
another problem since doing this, and it caused much head-scratching. It 
seems that if I pass a parameter by reference, and then pass that reference 
down into another function, the lower function gets a pointer to garbage 
rather than a pointer to the real value. So it can't properly work with or 
update the parameter.

The solution to this is to create a local variable in the upper function, 
and pass THAT down to the lower function, and copy the value across 
afterwards. But it's very annoying.

=== Lewin A.R.W. Edwards (Embedded Engineer)
Work: http://www.digi-frame.com/
Personal: http://www.zws.com/ and http://www.larwe.com/

"Und setzet ihr nicht das Leben ein,
Nie wird euch das Leben gewonnen sein."

             reply	other threads:[~2001-01-28 13:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-28 13:34 Lewin A.R.W. Edwards [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-01-28 10:37 Grant Edwards
2001-01-29  0:27 ` Andrew Lunn
2001-01-29  7:24   ` Grant Edwards
2001-01-29  9:49 ` Jonathan Larmour
2001-01-29  9:53   ` Grant Edwards
2001-01-29 14:15 ` Jesper Skov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4.3.2.7.2.20010128163342.00b0e430@larwe.com \
    --to=larwe@larwe.com \
    --cc=ecos-discuss@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).