Jump to content

Compiler [crashing?] Bug

Recommended Posts

Bug description:

A string can be declared as follows:

char* MyString = "Contents of string"

Missing of the '*' either causes the compiler to crash or mess-up some way.



Steps to reproduce:

Attempt to compile the following code (in a file "bug.c"):

#include <system.h>

void main() {
   char* String1 = "I will compile!";
   char String2 = "I upset the compiler!";

   while(true) {

Doing so will produce the following output:

BoostC Optimizing C Compiler Version 1.9.3 Beta (for PIC16 architecture)
Copyright(C) 2004-2005 Pavel Baranov
Copyright(C) 2004-2005 David Hobday

Exit code was 128.
Removing target: bug.obj
Failed to locate output file 'bug.obj'



I assume the compiler is crashing


Declaring String2 as a char* instead will compile.



Expected behaviour:

The compiler should throw up a helpful error message.



Is the problem 100% reproduceable:

Yup, every time!



Tested on:

IDE version: 5.8

Compiler: BoostC

Compiler version: 1.9.3

Target device: PIC16F877

OS: Win2k SP4

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.

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.

  • Create New...