On Sat, 24 Nov 2018 14:30:04 +0100 Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> wrote: > Currently, cgcc only checks input files if their name end with TTBOMK "name" and "end" should be the same number, either singular or plural, i.e. "name ends" or "names end". I am not a native English speaker either, so I may be wrong here. > '.c' or if given as stdout. Other files are explicitly ignored. > This generally corresponds to what is wanted but GCC allows > arbitrary input files if the option '-c <language>' is given. Should be '-x <language>'. > Some projects use this mechanism, for example to use the C > pre-processor on non-C files. > > This fails when cgcc is used as wrapper around sparse + GCC. > > Fix this by teaching cgcc about the '-x c' option. > > Reported-by: Antonio Ospite <ao2@xxxxxx> > Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> > --- > cgcc | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/cgcc b/cgcc > index 400044253..e215827c7 100755 > --- a/cgcc > +++ b/cgcc > @@ -39,6 +39,14 @@ while (@ARGV) { > $nargs = 1; > } > > + # Ignore the extension if '-x c' is given. > + if ($_ eq '-x') { > + die ("$0: missing argument for $_") if !@ARGV; > + die ("$0: invalid argument for $_") if $ARGV[0] ne 'c'; > + $do_check = 1; > + $nargs = 1; > + } > + > $m32 = 1 if /^-m32$/; > $m64 = 1 if /^-m64$/; > $gendeps = 1 if /^-M$/; > -- > 2.19.0 > -- Antonio Ospite https://ao2.it https://twitter.com/ao2it A: Because it messes up the order in which people normally read text. See http://en.wikipedia.org/wiki/Posting_style Q: Why is top-posting such a bad thing?