Jump to content
Sign in to follow this  

Boostc: Union Size Is Too Large

Recommended Posts

Bug description:

The BoostC compiler is making unions tool large. It makes them the same size

as a structure.


Steps to reproduce:

1.) Create a new project

2.) Add a main.c file to the project with the following code

union TEST
  int x1;
  int x2;
  int x3;
  int x4;
  int x5;

union TEST w;

void main()



3.) Compile and link the project using BoostC

4.) Notice the compiler reports that 10 bytes of RAM are used when only 2 bytes should be used.


Expected behavior:

Only 2 bytes of RAM should be used.


Is the problem 100% reproducible:



SourceBoost version: 5.7

Compiler: BoostC

Compiler version: 1.7 Alpha


OS: Windows XP




Share this post

Link to post
Share on other sites



I have had a look at this one.

Quite right there is a problem here - looks like compiler is generating wrong size for this new data type - so I'm in the clear on this as I only work on linker, its a little job for Pavel :blink:




Share this post

Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...