On Thu, 17 Mar 2022 at 16:22, James K. Lowden wrote: > > On Wed, 16 Mar 2022 14:45:33 -0400 > Marek Polacek <pola...@redhat.com> wrote: > > Hi Marek, > > > Let's avoid -f-foo; use -ffoo instead, like the rest of GCC. > > Sure. I hadn't noticed the distinction.
There are no existing options of the form -f-foo, only -ffoo. There is the -I- option, but it's weird and deprecated, and I don't suggest using it as good style. > > > In cobol/lang.opt, I have: > > > > > > indicator-column > > > > Make this 'findicator-column='. Does that help? > > Yes, with that change, the option & argument are passed. But ... why? > > It's my understanding that the -f prefix indicates a switch, meaning: > > 1. It does not take an argument There are lots of counterexamples such as -fplugin= and -fuse-ld= And -fdiagnostics-column-origin=n which looks similar to what you want to do, i.e. it takes a numeric argument. Note that it's declared with an '=' in the name: fdiagnostics-column-origin= Common Joined RejectNegative UInteger > That's good to know; at least you're not telling me it's horribly out > of date. I am puzzled, though, because AFAICT that document doen't > indicate why a leading "f" or trailing "=" controls whether or not an > option taking an argument is passed to the compiler. Somebody will correct me if I'm wrong, but I think the leading f has nothing to do with it. The point is just that -ffoo arg is two separate options to the driver, and I don't think it knows that it needs to pass the second one to the compiler process alongside the first one. You didn't define your option to take an argument in the .opt file.