Jump to content
hollie

Add New Preprocessor Directive

Recommended Posts

Hello,

 

currently, the preprocessor only supports generating errors at compile time.

 

Would it be possible to add support for a #warning directive please? This would allow the programmer to print a statement to the compilation output window.

 

I ask this because I've been debugging some code that worked fine on an 18F2320 and that stopped working after the transition to an 18F4620.

 

Half a day later I found out that 'DEBUG' is defined for the 18F4620 target :(

 

It would be very handy (and time-saving) if something like the following code construct is supported:

 

#ifdef SOMETHING
#warning "Using alternative code, because SOMETHING is defined"
...
#endif

 

Regards.

Share this post


Link to post
Share on other sites

The warning preprocessor directive is already supported (check the lcd.c sample file).

 

Regards,

Pavel

Share this post


Link to post
Share on other sites

Hi Pavel,

 

Great! I'll update my libs then.

 

I noticed that the warning directive is not mentioned in the BoostC documentation yet.

 

Regards,

Lieven.

Share this post


Link to post
Share on other sites

Your content will need to be approved by a moderator

Guest
You are commenting as a guest. If you have an account, please sign in.
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...

×