This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]