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

Is there some known problem using #module?

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








Is there some known problem using #module?
PostPosted: Mon Feb 02, 2009 11:13 am     Reply with quote

Is there some known problem using
Code:
#module
?

I ask because I experience problem in my program when I put the #module in.
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Mon Feb 02, 2009 2:53 pm     Reply with quote

Post your compiler version number.

Describe the problem you get.
Guest








PostPosted: Tue Feb 03, 2009 2:48 am     Reply with quote

Hi

My project is some "c" files and some "h" files (prototyping). The project is a working project with 3000 lines.

I made a backup and want to make more structure in the files.

I put #module in one of the "c" files and the project still compile and run as expected.

But when applying the #module in one more file some malfunction appear in the project it compile without any problem. I then trying to move the keyword #module longer down in the file and I can then get the project to run. I looked in the list file for some compare and it look like the compiler destroy the printf() function all place...

Solution I just drop the #module keyword.
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Tue Feb 03, 2009 3:58 am     Reply with quote

The #module is a new function of the v4 compiler, it is very well possible you have found a bug.

Always mention your compiler version number so it can be checked to be an old and solved problem or is a new bug. Without version number I'm not going to waste time looking into it.
Guest








PostPosted: Tue Feb 03, 2009 5:37 am     Reply with quote

PIC 18x2455 CCS 4.083.

Maybe try to put some #module in your "c" file and make compile test, but you must compare the "list" file.

I think the "c" file you try it on must deal function to other module, and you then need to make some prototyping, before the #module keyword.
andrewg



Joined: 17 Aug 2005
Posts: 316
Location: Perth, Western Australia

View user's profile Send private message Visit poster's website

PostPosted: Tue Feb 03, 2009 5:49 am     Reply with quote

Apart from the prototyping issues already mentioned, the typical problem I get is the compiler putting automatically generated compiler functions into modules, eg the multiply and divide functions.

I've worked around that by having a function outside all the modules that performs the required operations to define the needed functions before the modules have a chance to. The function itself isn't called by anything and so gets optimised away.
_________________
Andrew
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