0

As far as I remember some older gcc versions don't support the @file option. I am not very sure. Could someone give any pointers related to this?

For reference

   @file
   Read command-line options from file.  The options read are inserted
   in place of the original @file option.  If file does not exist, or
   cannot be read, then the option will be treated literally, and not
   removed.

   Options in file are separated by whitespace.  A whitespace
   character may be included in an option by surrounding the entire
   option in either single or double quotes.  Any character (including
   a backslash) may be included by prefixing the character to be
   included with a backslash.  The file may itself contain additional
   @file options; any such options will be processed recursively.

Thanks

dbc
  • 104,963
  • 20
  • 228
  • 340
Prasoon Saurav
  • 91,295
  • 49
  • 239
  • 345
  • 2
    The [online documentation](http://gcc.gnu.org/onlinedocs/) goes back all the way to version 2.95.3. It might take some time, but easy to check all the versions. – Some programmer dude Feb 27 '13 at 08:06
  • 1
    Also, assuming the option was present in all versions up from a certain release, you can use binary search. – Electro Feb 27 '13 at 08:09
  • It seems gcc 4.1.2 doesn't support it. – Prasoon Saurav Feb 27 '13 at 09:10
  • @PrasoonSaurav, check again. My gcc-4.7.2-8.fc18.x86_64 (Fedora 18) cites in in the manpage under "Overall options". And it works. – vonbrand Feb 27 '13 at 17:35
  • @vonbrand How does your check of gcc-4.7.2 negate PrasoonSaurav's assertions that it doesn't work in gcc-4.1.2? These compilers are 5 years apart. – Employed Russian Feb 28 '13 at 01:05
  • @EmployedRussian, there was a statement that it was in gcc-2.95, I remember being quite intrigued by the option in some pre-2 gcc, and it is present in 4.7.2. So I think PrasoonSaurav is mistaken. – vonbrand Feb 28 '13 at 01:14
  • @vonbrand You've misunderstood Joachim's comment. The **online documentation** for all releases goes back to 2.95, but the existence of **this feature** is not that old. – Ti Strga Dec 30 '15 at 21:12

2 Answers2

3

This was committed to gcc source here:

2005-11-23  Mark Mitchell  <mark@codesourcery.com>

    * doc/invoke.texi: For man pages, include gcc-vers.texi.
    List @file in the option summary.  Include the libiberty
    documentation for @file.
    * gcc.c (main): Call expandargv.
    * Makefile.in (gcc-vers.texi): Define srcdir.

According to release history, this should have made it into GCC 4.1

Employed Russian
  • 199,314
  • 34
  • 295
  • 362
0

The accepted answer is wrong.

The mentioned revision (SVN r107426) is not included in 4.1.x branches. It actually works since 4.2.0, consistent to the document.

FrankHB
  • 2,297
  • 23
  • 19