Jump to content
Sign in to follow this  

Inline Within Inline Bug

Recommended Posts

Bug description: Calling an inline function winthin another inline function crashes BoostC.


Steps to reproduce: See source code. The compiler generated a popup Error message


Error: Access violation at 0x0044601E (tried to read from 0x00000004), program terminated.


Removing the second inline compiles with no error.


#include <system.h>

inline char getA(char ch)
 return ch;

inline char getB(char ch)
//^^== compiler crashes - remove that inline to compile ==
 return getA(ch);

void main()
 char ch;
 ch = getB('w');
 for (;;)


Expected behaviour: Unlimited nesting of inlines - PC stack bigger than PIC one.


Is the problem 100% reproduceable: 100% reproduceable


IDE version: 5.9.1

Compiler: BoostC

Compiler version: 2.0.1 Beta for PIC16 and PIC18

Target device: PICXXXXX (all PIC16 and PIC18)

OS: Windows-XP Professional 2002 - SP2

Share this post

Link to post
Share on other sites

This one has been just fixed. Fix will be available in the next relese. The workaround is to change argument name in the inlined functions so that they don't match.




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...