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

            Bug ID: 101032
           Summary: Regression on parser with g++11 using experimental
                    c++20 (compiles under c++17)
           Product: gcc
           Version: 11.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kevin.c.eady at gmail dot com
  Target Milestone: ---

the exact version of GCC: g++ (GCC) 11.1.0

the system type / the options given when GCC was configured/built: this is the
official gcc:11.1.0 docker image

the complete command line that triggers the bug: g++ -Wall -Wextra
-Wno-deprecated -fsyntax-only -save-temps -std=c++20 napi-full.h

the compiler output (error messages, warnings, etc.):
napi-full.h:3305:60: error: expected unqualified-id before ')' token
 3305 |     TypedThreadSafeFunction<ContextType, DataType, CallJs>();
      |                                                            ^
napi-full.h:3307:33: error: expected ')' before 'tsFunctionValue'
 3307 |         napi_threadsafe_function tsFunctionValue);
      |                                 ^~~~~~~~~~~~~~~~
      |                                 )
napi-full.h:3306:59: note: to match this '('
 3306 |     TypedThreadSafeFunction<ContextType, DataType, CallJs>(
      |                                                           ^
napi-full.h:8276:8: error: no declaration matches
'Napi::TypedThreadSafeFunction<ContextType, DataType,
CallJs>::TypedThreadSafeFunction()'
 8276 | inline TypedThreadSafeFunction<ContextType, DataType, CallJs>::
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
napi-full.h:8276:8: note: no functions named
'Napi::TypedThreadSafeFunction<ContextType, DataType,
CallJs>::TypedThreadSafeFunction()'
napi-full.h:3175:9: note: 'class Napi::TypedThreadSafeFunction<ContextType,
DataType, CallJs>' defined here
 3175 |   class TypedThreadSafeFunction {
      |         ^~~~~~~~~~~~~~~~~~~~~~~
napi-full.h:8283:8: error: no declaration matches
'Napi::TypedThreadSafeFunction<ContextType, DataType,
CallJs>::TypedThreadSafeFunction(napi_threadsafe_function)'
 8283 | inline TypedThreadSafeFunction<ContextType, DataType, CallJs>::
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
napi-full.h:8283:8: note: no functions named
'Napi::TypedThreadSafeFunction<ContextType, DataType,
CallJs>::TypedThreadSafeFunction(napi_threadsafe_function)'
napi-full.h:3175:9: note: 'class Napi::TypedThreadSafeFunction<ContextType,
DataType, CallJs>' defined here
 3175 |   class TypedThreadSafeFunction {
      |         ^~~~~~~~~~~~~~~~~~~~~~~

the preprocessed file (*.i*) that triggers the bug: it is over the 1000 K size
limit, please see
https://drive.google.com/file/d/1oMEjMEuKG7806DlXbfJaHxAzVF3sUTFs/view?usp=sharing
 


note: when using c++17, the file passes the syntax check

Reply via email to