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

            Bug ID: 97418
           Summary: error diagnostics do not point the use of undeclared
                    identifier
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tangyixuan at mail dot dlut.edu.cn
  Target Milestone: ---

Hi, the following code is ill-formed. GCC may not point out the error in code
(use of undeclared identifier 'A' and 'C'), maybe it could be improved I guess. 

$ cat s.cpp

namespace N { 
  struct S {}; 
  void S (); 
  void func (){ class S a ;}
} 
void func (){ 
  class A :: B * b =& C :: A :: B ;
}

$ g++ -c s.cpp
216-8.C: In function ‘void func()’:
216-8.C:7:16: error: qualified-id in declaration before ‘*’ token
    7 |   class A :: B * b =& C :: A :: B ;
  • [Bug c++/97418] New: error... tangyixuan at mail dot dlut.edu.cn via Gcc-bugs

Reply via email to