Jump to content

Bootc 6.80 Fails To Produce Warning


Recommended Posts

//
// File: bug13.C
// Target: PIC16F648A
// OS: WinXP, SP2
// SourceBoostIDE: 6.80
// Compiler: BoostC 6.80
// Reproducible: always
// Expected behavior: compile with warning of arithmetic overflow.
//
// Description: 
//
//  Constant value calculated by compiler has overflowed.
//  This should cause some kind of notification.
//  
#include <system.h>

volatile unsigned long v;
volatile short i;
volatile unsigned short u;
volatile signed char a;
volatile unsigned char b;

void main()
{
 v = 2147483647 + 2147483647 + 2;
 i = 32767 + 32767 + 2;
 u = 65535 + 1;
 a = 127 + 127 + 2;
 b = 255 + 1;

 for(;;);
}

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