Jump to content

Struct Member Access Problems


Recommended Posts

Bug description:

Struct member access dot operators ('.' and '->') aren´t checking types.

The *wrong* code that follows compiles and links OK.

 

Steps to reproduce:

#include <system.h>
//
struct TBuffer {
char in;
} aBuffer, *BufPtr;
//
void main()
{
aBuffer.in	= 1;
aBuffer->in	=	2;	// (ERROR: *aBuffer is not a struct)
BufPtr.in  = 3;	// (ERROR:  BufPtr  is not a struct)
BufPtr->in	= 4;
for(;;) {;}
}

Expected behaviour:

Catch the ERRORs as commented.

 

Problem 100% reproduceable.

 

IDE version: 5.9.1

Compiler: BoostC

Compiler version: 2.0.1 Beta

Target device: PICXXXXX

OS: Windows-XP

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