This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: Adding a new file extension to the GCC recognised list.
- From: "Rupert Wood" <me at rupey dot net>
- To: <bosco at ashling dot com>
- Cc: "'Gcc-Help'" <gcc-help at gcc dot gnu dot org>
- Date: Thu, 2 May 2002 12:03:00 +0100
- Subject: RE: Adding a new file extension to the GCC recognised list.
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.