CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

make8 Compiler Error in v4.124

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
EdWaugh



Joined: 07 Dec 2004
Posts: 127
Location: Southampton, UK

View user's profile Send private message

make8 Compiler Error in v4.124
PostPosted: Sun Aug 14, 2011 5:21 am     Reply with quote

Hi All,

I seem to be having another problem with a new CCS release. v4.124 throws an 'Invalid parameters to built in function' error on some code which v4.121 found acceptable. I have reported the bug to CCS and got the usual slightly rude and uninterested response but hopefully they will get around to fixing it. I should point out that they did fix the bug I reported a while ago and was discussed here:

http://www.ccsinfo.com/forum/viewtopic.php?t=44391&highlight=

I have written some test code which generates the error:
errortest_main.c
Code:

#include <18f87J11.h>
#pragma device adc=10 HIGH_INTS=TRUE *=16

#include "typedefs.h"
#include "errortest_main.h"

void main(void)
{
   uint16_t test_array[2];
   test_array[0] = 0x1234;
   test_array[1] = 0x5678;
   test_function(test_array);
}

uint8_t test_function(uint16_t *ui16_array)
{
   uint8_t test_byte = make8(ui16_array[0], 1);

   return test_byte;
}

errortest_main.h
Code:

#ifndef __ERRORTEST_MAIN_H

   #define __ERRORTEST_MAIN_H

   void main(void);
   uint8_t test_function(uint16_t *ui16_array);

#endif // __ERRORTEST_MAIN_H


Let me know if you have similar problems or can see an error in what I have written, I'll update when/if there is a fix.

Cheers

Ed
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Sun Aug 14, 2011 7:42 am     Reply with quote

Seems like understanding types is luck of the draw for CCS C. You have to be aware of unexpected changes with new versions. Making the code more explicite often helps, also in this case.

Code:
test_byte = make8((uint16_t)(ui16_array[0]), 1);
EdWaugh



Joined: 07 Dec 2004
Posts: 127
Location: Southampton, UK

View user's profile Send private message

CCS are issuing a fix
PostPosted: Fri Aug 19, 2011 5:17 am     Reply with quote

Hi FvM,

Thanks for your reply, I had not tried explicitly typing the variable, I do feel like that shouldn't be necessary in this case tho.

I got a response from CCS and they sent me a dll that fixes the error, this will be included in the next release.

Cheers

Ed
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group