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

            Bug ID: 125922
           Summary: [reflection] Reflection operator incorrectly allows
                    class definitions
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: luigighiron at gmail dot com
  Target Milestone: ---

The following code is incorrectly accepted by GCC:

int main(){
    consteval{
        ^^struct{};
    }
}

This should be rejected for the same reason that sizeof(struct{}) is rejected,
struct{} is not a valid type-id.

Reply via email to