This is the mail archive of the gcc@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]

Re: Question about option -fpermissive


On Jun 26, 1999, Andris Pavenis <andris@stargate.astr.lu.lv> wrote:

> 	Any warning is interpretted as error.

Not really, but g++ 2.95 is going to become much stricter WRT to C++
correctness.  Requiring -fpermissive for code that used to be accepted 
only with a warning is really intentional (not that I fully agree with 
it, but it's not up to me to decide it :-)

> #undef CC1PLUS_SPEC
> #define CC1PLUS_SPEC "%{!fno-permissive:-fpermissive}"

It might be nice to mention this trick somewhere in the FAQ.
Ok to install?

-- 
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
{oliva,Alexandre.Oliva}@dcc.unicamp.br  aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
*** E-mail about software projects will be forwarded to mailing lists
*** faq.html	1999/06/14 12:22:17	1.124
--- faq.html	1999/06/29 09:21:06
***************
*** 703,711 ****
  complain that types are missing. These headers assume that omitting
  the type means 'int'; this assumption is wrong for C++.
  <p>
! g++ accepts such (illegal) constructs with the option -fpermissive;
! it will assume that missing type is 'int' (as defined by the C89
! standard).
  <p>
  Since the upcoming C99 standard also obsoletes the implicit type
  assumptions, the X11 headers have to get fixed eventually.
--- 703,713 ----
  complain that types are missing. These headers assume that omitting
  the type means 'int'; this assumption is wrong for C++.
  <p>
! g++ accepts such (illegal) constructs with the option -fpermissive; it
! will assume that missing type is 'int' (as defined by the C89
! standard).  You may turn -fpermissive on by default by adding
! <code>%{!fno-permissive:-fpermissive}</code> to the line just after
! `*cc1plus:' in the gcc specs file.
  <p>
  Since the upcoming C99 standard also obsoletes the implicit type
  assumptions, the X11 headers have to get fixed eventually.
***************
*** 1191,1197 ****
  <hr>
  
  <p><a href="index.html">Return to the EGCS home page</a>
! <p><i>Last modified:  June  3, 1999</i>
  
  </body>
  </html>
--- 1193,1199 ----
  <hr>
  
  <p><a href="index.html">Return to the EGCS home page</a>
! <p><i>Last modified:  June 29, 1999</i>
  
  </body>
  </html>

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