Dear,
following this procedure:
$ pgcc --version
pgcc 18.4-0 64-bit target on x86-64 Linux -tp haswell
PGI Compilers and Tools
Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
$ cat >empty.c <<EOF
#include <string.h>
EOF
$ pgcc -c empty.c -MD
$ test -s empty.d && echo not empty || echo does not exists
not empty
$ rm empty.d
$ pgc++ --version
pgc++ 18.4-0 64-bit target on x86-64 Linux -tp haswell
PGI Compilers and Tools
Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
$ cat >empty.cc <<EOF
#include <string.h>
EOF
$ pgc++ -c empty.cc -MD
empty.o : empty.cc \
/home/wesarg/opt/pgi-18.4/linux86-64/18.4/include-gcc70/_cplus_macros.h \
/home/wesarg/opt/pgi-18.4/linux86-64/18.4/include/_cplus_preinclude.h \
/usr/include/string.h /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \
/usr/include/features.h /usr/include/stdc-predef.h \
/home/wesarg/opt/pgi-18.4/linux86-64/18.4/include-gcc70/sys/cdefs.h \
/usr/include/x86_64-linux-gnu/sys/cdefs.h \
/usr/include/x86_64-linux-gnu/bits/wordsize.h \
/usr/include/x86_64-linux-gnu/bits/long-double.h \
/usr/include/x86_64-linux-gnu/gnu/stubs.h \
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
/home/wesarg/opt/pgi-18.4/linux86-64/18.4/include-gcc70/stddef.h \
/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h \
/usr/include/x86_64-linux-gnu/bits/types/locale_t.h \
/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h /usr/include/strings.h \
/home/wesarg/opt/pgi-18.4/linux86-64/18.4/include-gcc70/stddef.h \
/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h
$ test -s empty.d && echo not empty || echo does not exists
does not exists
violates the man page of pgc++ which states the same for pgcc and pgc++:
-MD Generate a list of make dependences and print them to the file
file.d, where file is the root name of the file under
compilation.
-MD Generate a list of make dependences and print them to the file
file.d, where file is the root name of the file under
compilation.