Jump to content
john27

Bug?

Recommended Posts

This simple code generates the error below. This happens in ver 6.95 and 6.81.

What am I missing?

 

 

 

 

//Autocorr5.c

// PIC18F2321

#include <system.h>

 

unsigned long sum(void);

unsigned long period;

 

void main()

{

period = sum();

}

 

unsigned long sum(void) //this is line 13 with the "error"

{

char jj;

unsigned long P;

P=1;

jj=2;

P=P+jj;

return (P);

}

 

 

 

 

 

 

Building...

BoostC Optimizing C Compiler Version 6.95 (for PIC18 architecture)

http://www.sourceboost.com

Copyright© 2004-2009 Pavel Baranov

Copyright© 2004-2009 David Hobday

 

Single user Lite License (Unregistered) for 0 node(s)

Limitations: PIC18 max code size:8192 bytes, max RAM banks:2, Non commercial use only

 

 

autocorr5.c

 

failure

C:\_HHmetronome\HH_PIC18\bug_test\autocorr5.c(13): error: missing right paren

C:\_HHmetronome\HH_PIC18\bug_test\autocorr5.c(13): error: general error

C:\_HHmetronome\HH_PIC18\bug_test\autocorr5.c(13): error: failure

"C:\Program Files\SourceBoost6_95\boostc.pic18.exe" autocorr5.c -t PIC18F2321

Exit code was 1.

Removing target: autocorr5.obj

Done

Share this post


Link to post
Share on other sites

'P' is already defined in the PIC18F2321.h file and therefore your 'P' is being substituted by a hex value.

 

Rename your variable and try again.

 

BoostC errors can be confusing at times.

 

Cheers

 

Reynard

Share this post


Link to post
Share on other sites
'P' is already defined in the PIC18F2321.h file and therefore your 'P' is being substituted by a hex value.

 

Rename your variable and try again.

 

BoostC errors can be confusing at times.

 

Cheers

 

Reynard

 

Wow -I didn't think to look there!

 

I'm glad I gave up and posted after only wasting 3 hours on the problem.

 

Thanks, Reynard!

Share this post


Link to post
Share on other sites
...BoostC errors can be confusing at times....

 

We have modified compiler to provide better error reporting for cases like this. This update will be available in the next release.

 

Regards,

Pavel

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.

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

Loading...

×
×
  • Create New...