Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: expected unqualified-id before numeric constant #398

Closed
sagitter opened this issue Oct 19, 2016 · 2 comments
Closed

Error: expected unqualified-id before numeric constant #398

sagitter opened this issue Oct 19, 2016 · 2 comments

Comments

@sagitter
Copy link

sagitter commented Oct 19, 2016

Hi all.

fmt 3.0.0 does not build on fedora 26 (development branch) with gcc-6.2.1:

[ 47%] Building CXX object test/CMakeFiles/posix-mock-test.dir/util.cc.o
cd /builddir/build/BUILD/fmt-3.0.0/build/test && /usr/bin/c++   -DFMT_USE_FILE_DESCRIPTORS=1 -DGTEST_HAS_STD_WSTRING=1 -I/builddir/build/BUILD/fmt-3.0.0 -I/builddir/build/BUILD/fmt-3.0.0/test/.  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -DNDEBUG   -std=c++11 -o CMakeFiles/posix-mock-test.dir/util.cc.o -c /builddir/build/BUILD/fmt-3.0.0/test/util.cc
In file included from /usr/lib/gcc/x86_64-redhat-linux/6.2.1/include/limits.h:168:0,
                 from /usr/lib/gcc/x86_64-redhat-linux/6.2.1/include/syslimits.h:7,
                 from /usr/lib/gcc/x86_64-redhat-linux/6.2.1/include/limits.h:34,
                 from /builddir/build/BUILD/fmt-3.0.0/test/./gmock/gmock.h:2028,
                 from /builddir/build/BUILD/fmt-3.0.0/test/gtest-extra.h:32,
                 from /builddir/build/BUILD/fmt-3.0.0/test/gtest-extra.cc:28:
/builddir/build/BUILD/fmt-3.0.0/fmt/format.h: In member function 'void fmt::internal::ArgFormatterBase<Impl, Char>::visit_char(int)':
/builddir/build/BUILD/fmt-3.0.0/fmt/format.h:1825:20: error: expected unqualified-id before numeric constant
     const unsigned CHAR_WIDTH = 1;
                    ^
[ 47%] Building CXX object test/CMakeFiles/posix-mock-test.dir/util.cc.o
cd /builddir/build/BUILD/fmt-3.0.0/build/test && /usr/bin/c++   -DFMT_USE_FILE_DESCRIPTORS=1 -DGTEST_HAS_STD_WSTRING=1 -I/builddir/build/BUILD/fmt-3.0.0 -I/builddir/build/BUILD/fmt-3.0.0/test/.  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -DNDEBUG   -std=c++11 -o CMakeFiles/posix-mock-test.dir/util.cc.o -c /builddir/build/BUILD/fmt-3.0.0/test/util.cc
In file included from /usr/lib/gcc/x86_64-redhat-linux/6.2.1/include/limits.h:168:0,
                 from /usr/lib/gcc/x86_64-redhat-linux/6.2.1/include/syslimits.h:7,
                 from /usr/lib/gcc/x86_64-redhat-linux/6.2.1/include/limits.h:34,
                 from /builddir/build/BUILD/fmt-3.0.0/test/./gmock/gmock.h:2028,
                 from /builddir/build/BUILD/fmt-3.0.0/test/gtest-extra.h:32,
                 from /builddir/build/BUILD/fmt-3.0.0/test/gtest-extra.cc:28:
/builddir/build/BUILD/fmt-3.0.0/fmt/format.h: In member function 'void fmt::internal::ArgFormatterBase<Impl, Char>::visit_char(int)':
/builddir/build/BUILD/fmt-3.0.0/fmt/format.h:1825:20: error: expected unqualified-id before numeric constant
     const unsigned CHAR_WIDTH = 1;
                    ^

Build log: https://copr-be.cloud.fedoraproject.org/results/sagitter/petsc/fedora-rawhide-x86_64/00465843-fmt/build.log.gz

Root log: https://copr-be.cloud.fedoraproject.org/results/sagitter/petsc/fedora-rawhide-x86_64/00465843-fmt/root.log.gz

@vitaut
Copy link
Contributor

vitaut commented Oct 19, 2016

Fixed in abbefd7. Thanks for reporting!

@vitaut vitaut closed this as completed Oct 19, 2016
@sagitter
Copy link
Author

Thank you.

dixlorenz added a commit to dixlorenz/cppformat that referenced this issue Apr 11, 2018
bacek added a commit to bacek/blackhole that referenced this issue Apr 30, 2018
3Hren pushed a commit to 3Hren/blackhole that referenced this issue May 1, 2018
tc3t added a commit to tc3t/dfglib that referenced this issue May 3, 2019
-fmt 3.0.0 caused build failure in dfgTest on some environments (fmtlib/fmt#398)
-Didn't update to latest 5.3.0 as it requires variadic templates not available in all supported compilers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants