Created attachment 189324 [details] Add spaces to avoid literal suffix error While testing the new clang600-import branch (see bug 224669), I noticed that smartmontools fails to compile, due clang++ 6.0.0 now defaulting to -std=gnu++14 (like g++ 6 and higher): os_freebsd.cpp:487:45: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal] else if (sscanf(dev, NVME_CTRLR_PREFIX"%d"NVME_NS_PREFIX"%d%c", ^ Here is a patch to fix it, adding spaces around the NVME_NS_PREFIX macro. This makes the source C++14 compatible. Alternatively, the port Makefile could explicitly set USE_CXXSTD= gnu++98.
Accepted, please commit. I will also patch upstream as well.
Fixed in the upstream, see https://www.smartmontools.org/changeset/4681
A commit references this bug: Author: dim Date: Mon Jan 1 21:19:34 UTC 2018 New revision: 457814 URL: https://svnweb.freebsd.org/changeset/ports/457814 Log: Make smartmontools 6.6 compile with clang 6.0.0 and higher Because clang 6.0.0 and higher default to -std=gnu++14, like gcc 6 and higher, compiling smartmontools results in the following error: os_freebsd.cpp:487:45: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal] else if (sscanf(dev, NVME_CTRLR_PREFIX"%d"NVME_NS_PREFIX"%d%c", ^ Fix this by adding spaces around the NVME_NS_PREFIX macro. This makes the source C++14 compatible. Approved by: samm@os2.kiev.ua (maintainer) PR: 224826 MFH: 2018Q1 Changes: head/sysutils/smartmontools/Makefile head/sysutils/smartmontools/files/patch-os__freebsd.cpp
A commit references this bug: Author: dim Date: Tue Jan 2 18:20:28 UTC 2018 New revision: 457915 URL: https://svnweb.freebsd.org/changeset/ports/457915 Log: MFH: r457814 Make smartmontools 6.6 compile with clang 6.0.0 and higher Because clang 6.0.0 and higher default to -std=gnu++14, like gcc 6 and higher, compiling smartmontools results in the following error: os_freebsd.cpp:487:45: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal] else if (sscanf(dev, NVME_CTRLR_PREFIX"%d"NVME_NS_PREFIX"%d%c", ^ Fix this by adding spaces around the NVME_NS_PREFIX macro. This makes the source C++14 compatible. Approved by: portmgr (zi) Approved by: samm@os2.kiev.ua (maintainer) PR: 224826 Changes: _U branches/2018Q1/ branches/2018Q1/sysutils/smartmontools/Makefile branches/2018Q1/sysutils/smartmontools/files/patch-os__freebsd.cpp