Jump to content

chovain

Members
  • Content Count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

About chovain

  • Rank
    Newbrie
  1. Compiler: boostc++_pic18 [running from cmdline] Version: 7.0.1 7.0.3 Target: PIC18F4550 OS: Win7-64 Bug description: Applying the unary pointer operator (&) to a pointer-type member variable results in an expression of incorrect type. Taking the address of a char* results in another char*. Non-member variables do not have this problem. Steps to reproduce: The following code does not compile. #include <system.h> char *globalPointer; class Foo { public: char *instancePointer; void bar(); }; void Foo::bar() { char *localPointer; char **x; x = &localPointer; x = &globalPointer; x = &instancePointer; } The compiler fails on the line "x = &instancePointer", with "error: can't convert 'unsigned char*' to 'unsigned char**'", suggesting it thinks "&instancePointer" is of type "char*". Is the problem 100% reproduceable: It appears to be, although I've only noticed it the once (plus this cut-down example). Expected behaviour: I expect it to compile Is this likely to have been corrected between 7.0.1 and 7.0.3? I tried upgrading to 7.0.3. It behaves the same way. (Incidentally, are there any release notes detailing what changes between versions?) Edit: Tried upgrading to 7.0.3.
×