A compiler like clang++ only does compiling of the source code. In your case, it creates the executable file a.out (since you didn't explicitly tell it to use some other output filename using the -o option). The compiler will not automatically run the resulting executable. These things also holds true for g++ (the GNU C++ compiler) as well as for both the ...
Pass the -fcompare-debug-second option to gcc.
gcc's internal API has a diagnostic_inhibit_note() function which turns any "note:" messages off, but that is only serviceable via the unexpected -fcompare-debug-second command line switch, defined here.
Fortunately, turning notes off is its only effect, unless the -fcompare-debug or the -fdump-final-insns ...
In Debian-based distributions, the package, binfmt-support, provides the functionality. Look in the procedure file system for the formats that were configured with installation of the package.
Make sure to also give the .pyc file/s permission to execute.