Jump to content
Andrew Leiper

Erroneous Warning '->' Is Used With A Non-pointer (use '.' Instead)

Recommended Posts

Hi Pavel,

 

It's me again I am afraid :lol:

 

boostc v7.01

PIC18F2525

 

warning: '->' is used with a non-pointer (use '.' instead)

If I avoid using the pTestStruct typedef it compiles OK.

 

 

//***********************

#include <system.h>

 

typedef struct {

char kw[5];

} TTestStruct;

typedef TTestStruct* pTestStruct;

 

typedef struct {

pTestStruct k; //k is the 128 bit key.

} TParams;

 

TParams XXP;

 

void main(void)

{

char p;

 

p = XXP.k->kw[0]; //Warning here

 

while(1);

}

 

//***********************

Share this post


Link to post
Share on other sites

Hi Andrew,

 

No warnings for me using PIC18F4580.

 

void main()

{
char p;

p = XXP.k->kw[0]; //Warning here
05CE  5020		  MOVF gbl_XXP+D'1', W
05D0  6EEA		  MOVWF FSR0H
05D2  501F		  MOVF gbl_XXP, W
05D4  6EE9		  MOVWF FSR0L
05D6  50EF		  MOVF INDF0, W
05D8  6E25		  MOVWF main_1_p

 

Cheers

 

Reynard

 

I spoke too soon. Turn on All Warnings and you get the warning. Doh!

Edited by Reynard

Share this post


Link to post
Share on other sites

Fixed. Fix will be available in the coming 7.02 release. Thanks for reporting.

 

Regards,

Pavel

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

×