Jump to content

Recommended Posts

Hi,

 

I don't know if it's a bug, but it's a bit annoying, that the boostC compiler (6.93RC2) only report a warning when i use the syntax:

 

structVar->element

 

where it's supposed to be:

 

structVar.element

 

since structVar is a struct variable, not a pointer to a struct.

 

It's annoying especially because, when compiling ten or more files, the warnings are reported only at compile time, and are not summarized after the linker has finished.

 

Regards, Elpidio

Link to post
Share on other sites

The short answer to your question is that yes compiler should report an error for such cases. The reason it reports a warning is that when the check for this condition was added to compiler it was too risky to make it an error because if the check (that is quite complex) does something wrong and reports a false positive a good code may stop compiling. However since this check was included into the public compiler releases we never received any reports about false positives. Probably it's time to make compiler report an errors for such cases.

 

Regards,

Pavel

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