Adding a new file extension to the GCC recognised list.
Rupert Wood
me@rupey.net
Thu May 2 04:03:00 GMT 2002
Patrick Noonan wrote:
> Does anyone know if it is possible to configure the default
> extensions that gcc recognises?
:
> However gcc does not recognise .mip (for example). Using "gcc
> -c test.mip" will result in error.
Yes; either look in lang-specs.h in the language frontend subdirectory
or, for C, look for the default_compilers structure in gcc/gcc.c. For
example, after:
/* Next come the entries for C. */
{".c", "@c", 0},
add the line
{".mip", "@c", 0},
Better, though, unless you have a lot of .mip files, would be to specify
the language on the command line per compile:
gcc -x c -c test.mip
Rup.
More information about the Gcc-help
mailing list