cobcd drops commas in arguments, like -Wa,-O0
Compiling with cobc -A -Wa,-O0 passes -Wa,-O0 to the gcc frontend, which will pass -O0 to the assembler.
Compiling with cobcd -A -Wa,-O0 passes -A -Wa -O0 to cobc, which will then "eat" -O0 (adding it later again) and passing -Wa to the gcc frontend, which will then complain that this is invalid.
The issue in in cobcd.py with the combination and splitting of the command line options.
I think that could be done differently, at least by switching to a different, less used separator, possibly a ~ (which we use in the symbol table, if I remember correctly) or a |/#.. but much less likely are possibly ^ or °.
(-Wa is only an example, that can be problematic in other cases as well)