On Wed, Apr 21, 2021 at 6:20 AM Peng Yu via Gcc-help <gcc-help@xxxxxxxxxxx> wrote: > > It seems when -print-prog-name does not exist. gcc still returns > normally. This doesn't make much sense. Shouldn't it return a nonzero > exist status in such a case? Thanks. > > $ gcc -print-prog-name=blahblah; echo $? > blahblah > 0 It returns normally because the option is provided as a service to find out about the absolute path of a possibly-hypothetical library, which is useful when you intend to build that library. > -- > Regards, > Peng -- Best regards, Tadeus