gimptool doesn't support source file names with special characters and suffixes(or without a suffix)
Run gimptool -n --install 'a b.c', you may get an output like this:
gcc -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/gimp-2.0 -o 'a b' a b.c -lgimpui-2.0 -lgimpwidgets-2.0 -lgimpmodule-2.0 -lgimp-2.0 -lgimpmath-2.0 -lgimpconfig-2.0 -lgimpcolor-2.0 -lgimpbase-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype
The generated command is broken without quoting the source file name when the file name contains "special" characters.
And run gimptool -n --install abc, you may get an output as this:
plug-in source abc is not a C or C++ file?
It's worth doing some extra job to support source files with arbitrary suffixes or without suffixes when possible, because the source files in an exsiting project might not be named with "standard" C or C++ suffixes, so if the developer of a such project would like to introduce their functionalities as a GIMP plug-in, they don't need to rename files to cater to the "standard" suffixes.