[Bug c++/92319] Macro expansion using the __VAOPT__ construct is incorrect when the variadic argument expands to nothing
eldlistmailingz at tropicsoft dot com
gcc-bugzilla@gcc.gnu.org
Thu Jan 30 19:42:00 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92319
Edward Diener <eldlistmailingz at tropicsoft dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |eldlistmailingz@tropicsoft.
| |com
--- Comment #2 from Edward Diener <eldlistmailingz at tropicsoft dot com> ---
Created attachment 47743
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47743&action=edit
C++ source file to illustrate bug report
Command lines on Fedora 31:
gcc.compile.c++
/home/fceldiener/build/boost/bin.v2/libs/test_local/test/test_gcc_vaopt_bug.test/gcc-c20-9.2/debug/threading-multi/visibility-hidden/test_gcc_vaopt_bug.o
"/usr/bin/g++" -fvisibility-inlines-hidden -fPIC -m64 -pthread -O0
-fno-inline -Wall -g -fvisibility=hidden -std=c++2a -DBOOST_ALL_NO_LIB=1
-I"../../.." -c -o
"/home/fceldiener/build/boost/bin.v2/libs/test_local/test/test_gcc_vaopt_bug.test/gcc-c20-9.2/debug/threading-multi/visibility-hidden/test_gcc_vaopt_bug.o"
"test_gcc_vaopt_bug.cpp"
gcc.link
/home/fceldiener/build/boost/bin.v2/libs/test_local/test/test_gcc_vaopt_bug.test/gcc-c20-9.2/debug/threading-multi/visibility-hidden/test_gcc_vaopt_bug
"/usr/bin/g++" -o
"/home/fceldiener/build/boost/bin.v2/libs/test_local/test/test_gcc_vaopt_bug.test/gcc-c20-9.2/debug/threading-multi/visibility-hidden/test_gcc_vaopt_bug"
-Wl,--start-group
"/home/fceldiener/build/boost/bin.v2/libs/test_local/test/test_gcc_vaopt_bug.test/gcc-c20-9.2/debug/threading-multi/visibility-hidden/test_gcc_vaopt_bug.o"
-Wl,-Bstatic -Wl,-Bdynamic -lrt -Wl,--end-group -fPIC -m64 -pthread -g
-fvisibility=hidden -fvisibility-inlines-hidden
Ouptut:
*********************************************************************
__cplusplus = 201709
*********************************************************************
Success: F()
f(0 )
Failure: F(EMP)
f(0 , ) [expected]: f(0)
*********************************************************************
More information about the Gcc-bugs
mailing list