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

            Bug ID: 119236
           Summary: GCC incorrectly accepts alignof() operator applied to
                    function type
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: qurong at ios dot ac.cn
  Target Milestone: ---

For this program:


int main ( void ) {
 alignof ( void ( void ) ) ;
 return 0;
}

This causes an error in clang and msvc, but gcc didn't report the error. 

Compiler Explorer link: https://godbolt.org/z/1e9hEqGne

Reply via email to