[Bug c++/88538] New: parse error with class nontype template parameter
hanicka at hanicka dot net
gcc-bugzilla@gcc.gnu.org
Tue Dec 18 14:14:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88538
Bug ID: 88538
Summary: parse error with class nontype template parameter
Product: gcc
Version: 9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hanicka at hanicka dot net
Target Milestone: ---
Created attachment 45254
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45254&action=edit
parser error on line 12
Compiler should be able to parse attached code in C++2a mode with Class Nontype
Template Arguments, instead it's giving me error "parse error in template
argument list"
Using built-in specs.
COLLECT_GCC=g++-HEAD
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/HEAD-0edf78b/libexec/gcc/x86_64-apple-darwin18.2.0/9.0.0/lto-wrapper
Target: x86_64-apple-darwin18.2.0
Configured with: ../configure --build=x86_64-apple-darwin18.2.0
--prefix=/usr/local/Cellar/gcc/HEAD-0edf78b
--libdir=/usr/local/Cellar/gcc/HEAD-0edf78b/lib/gcc/HEAD --disable-nls
--enable-checking=release --enable-languages=c,c++,objc,obj-c++,fortran,d
--program-suffix=-HEAD --with-gmp=/usr/local/opt/gmp
--with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc
--with-isl=/usr/local/opt/isl --with-system-zlib --with-pkgversion='Homebrew
GCC HEAD-0edf78b'
--with-bugurl=https://github.com/Homebrew/homebrew-core/issues
--disable-multilib --with-native-system-header-dir=/usr/include
--with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
Thread model: posix
gcc version 9.0.0 20181212 (experimental) (Homebrew GCC HEAD-0edf78b)
COLLECT_GCC_OPTIONS='-std=c++2a' '-v' '-mmacosx-version-min=10.14.0'
'-asm_macosx_version_min=10.14' '-shared-libgcc' '-mtune=core2'
/usr/local/Cellar/gcc/HEAD-0edf78b/libexec/gcc/x86_64-apple-darwin18.2.0/9.0.0/cc1plus
-quiet -v -D__DYNAMIC__ gcc9parse-error.cpp -fPIC -quiet -dumpbase
gcc9parse-error.cpp -mmacosx-version-min=10.14.0 -mtune=core2 -auxbase
gcc9parse-error -std=c++2a -version -o
/var/folders/dv/kkg4z5lj0g52m8q8mm0wk6rw0000gn/T//ccoEsrny.s
GNU C++17 (Homebrew GCC HEAD-0edf78b) version 9.0.0 20181212 (experimental)
(x86_64-apple-darwin18.2.0)
compiled by GNU C version 9.0.0 20181212 (experimental), GMP version
6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.20-GMP
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory
"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/local/include"
ignoring nonexistent directory
"/usr/local/Cellar/gcc/HEAD-0edf78b/lib/gcc/HEAD/gcc/x86_64-apple-darwin18.2.0/9.0.0/../../../../../../x86_64-apple-darwin18.2.0/include"
ignoring nonexistent directory
"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/Cellar/gcc/HEAD-0edf78b/lib/gcc/HEAD/gcc/x86_64-apple-darwin18.2.0/9.0.0/../../../../../../include/c++/9.0.0
/usr/local/Cellar/gcc/HEAD-0edf78b/lib/gcc/HEAD/gcc/x86_64-apple-darwin18.2.0/9.0.0/../../../../../../include/c++/9.0.0/x86_64-apple-darwin18.2.0
/usr/local/Cellar/gcc/HEAD-0edf78b/lib/gcc/HEAD/gcc/x86_64-apple-darwin18.2.0/9.0.0/../../../../../../include/c++/9.0.0/backward
/usr/local/Cellar/gcc/HEAD-0edf78b/lib/gcc/HEAD/gcc/x86_64-apple-darwin18.2.0/9.0.0/include
/usr/local/Cellar/gcc/HEAD-0edf78b/lib/gcc/HEAD/gcc/x86_64-apple-darwin18.2.0/9.0.0/include-fixed
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks
End of search list.
GNU C++17 (Homebrew GCC HEAD-0edf78b) version 9.0.0 20181212 (experimental)
(x86_64-apple-darwin18.2.0)
compiled by GNU C version 9.0.0 20181212 (experimental), GMP version
6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.20-GMP
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 6936071dc75afe7297cddcec7cf6ee71
gcc9parse-error.cpp: In function 'void f()':
gcc9parse-error.cpp:12:5: error: parse error in template argument list
12 | fnc<{10,20}>();
| ^~~~
gcc9parse-error.cpp:12:9: error: expected ';' before '{' token
12 | fnc<{10,20}>();
| ^
| ;
gcc9parse-error.cpp:12:5: error: statement cannot resolve address of overloaded
function
12 | fnc<{10,20}>();
| ^~~~
gcc9parse-error.cpp:12:16: error: expected primary-expression before '>' token
12 | fnc<{10,20}>();
| ^
gcc9parse-error.cpp:12:18: error: expected primary-expression before ')' token
12 | fnc<{10,20}>();
| ^
More information about the Gcc-bugs
mailing list