The issue stems from how the PowerShell handles the wildcard (*) in the *.c or *.cpp pattern.
Unlike Unix-based shells (like Bash), Windows shells do not automatically expand wildcards like *.c into a list of matching files, so GCC literally receives *.c, which is not a valid filename.