https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122914

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
            Summary|GCC accepts invalid C++     |QoI for use of the dot
                   |code: `this.member` treated |operator with a dependent
                   |as `this->member` (C++      |value that is of a
                   |beginner unsure if bug or   |dependent pointer type
                   |GNU extension)              |
           Keywords|                            |accepts-invalid

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
That is if do:
```
int main(){
    box<true> a;
    a.fun();
}
```
GCC will correctly reject the code.

This is just a QOI issue where the dot operator is not rejected for a dependent
pointer right away but only during instantiate.

That is:
```
template <class V>
struct box{
    void fun(){
        a.value;
    }
    V *a;
};
```
Also be rejected.

Reply via email to