public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* RFA: Deprecate C++ options
@ 2001-09-06  3:40 Nathan Sidwell
  2001-09-06 14:43 ` Mark Mitchell
  2001-09-07 13:40 ` Jason Merrill
  0 siblings, 2 replies; 29+ messages in thread
From: Nathan Sidwell @ 2001-09-06  3:40 UTC (permalink / raw)
  To: gcc; +Cc: mark, jason

Hi,
There are several flags which change the language compiled by G++.
It's difficult to support any particular combination of them. See
http://gcc.gnu.org/ml/gcc/2001-04/msg01243.html for an example.

I'd like to deprecate and then remove them from g++ asap. I
suggest deprecating them in 3.1 and removal in 3.2

Support of old ARM conformant code
-fno-for-scope
	the for loop variable's scope extends beyond the loop
-fcheck-new
	cope with operator new returning null, rather than throwing
	The interaction of this with the builtin operator new and
	-fno-exceptions confuses users.
-fno-operator-names
	don't have `and' `or' etc as keywords

Bug workaround. Are there many access control bugs? I can't recall any
in GNATs off hand.
-fno-access-control
	don't check access

Unknown.
-fno-elide-constructors
	don't elide copy ctors What is the rationale for this? I'd've
	thought -O0 would be a suitable switch for this.

No doubt this is an SC issue, perhaps Mark or Jason could raise it there?

thanks

nathan

-- 
Dr Nathan Sidwell   ::   http://www.codesourcery.com   ::   CodeSourcery LLC
         'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org

^ permalink raw reply	[flat|nested] 29+ messages in thread
* Re: RFA: Deprecate C++ options
@ 2001-09-07  9:41 George Garvey
  2001-09-07 10:00 ` Mark Mitchell
  2001-09-12  6:27 ` Gerald Pfeifer
  0 siblings, 2 replies; 29+ messages in thread
From: George Garvey @ 2001-09-07  9:41 UTC (permalink / raw)
  To: gcc; +Cc: Mark Mitchell

On Fri, Sep 07, 2001 at 09:02:43AM -0700, Mark Mitchell wrote:
> There's no need to be sarcastic.  If you don't like Nathan's proposal,
> just say so.

   Its an expression of frustruation. Whether its necessary or not you've
now told me, and I apologize for tastelessly expressing the way I see it.
   What I really object to is one person stating the consequences for
thousands of people unknown to that one, rather than asking. Yes, I know,
Nathan asked.

> Would you rather have support for these old constructs, or other
> improvements to the compiler, including better support for the lanaguage
> as specified in the standard, better optimizations, and (especially)
> fewer bugs?

   I can't answer that, since I've now been informed its an either/or. I
don't know:
      1. The degree of effort required, due to no personal experience on
         this particular subject;
      2. The man-power available; for the same reason.
So I would not trust any decision I made.
   Were this a project I were personally developing; and I came across this
problem; and saw that it could not be done: I would question the design of
the system I was working on.
   I'm not saying its not good, but I'd certainly question it and get the
answer to whether it has an intrinsic design flaw since it can't support
continuing the feature easily. That's is the first impression without
enough hands-on experience with this project to know if its valid.
   Here I'm a user, and I don't have a valid opinion so I won't express
one. But, in bad taste or not, you now have the point of view of one user,
and the consequences of the decision which you (as a group) will make, who
may or may not be representative. That's what I would prefer the developers
do: ask the users, rather than saying they know the consequences for them.
   We are hoping to move away from the unsupported code, but cannot say
when, because it must be replaced, not discarded. Suspect there's quite a
few folk in this position.
   Perhaps you could take this into account when you make an informed
decision, which makes more sense than asking me to make an uninformed
decision. Because, as a user, the answer is I want both.
   The only opinion I can properly express: I would like to have a compiler
that is not so incredibly slow and produces working code. If that requires
removing those features, so be it. I'll take my lumps. I did not hear that.
I heard "its hard" not "its necessary". I suspect it may be necessary due
to problems with the design of gcc, but don't know for sure. If that's
true, I would question continuing that design. I know that's another issue
entirely.
   FYI, we've upgraded a number of computers for developers twice now: once
due to the doubling of memory needs for EGCS (pretty simple and
inexpensive); once for the doubling of compile times for GCC 3 (equally
simple, but not as inexpensive, and less effective). But we bought the
ability to turn off all the defines for EGCS bug work-arounds that were
reported, if there was a response (not always), it was: fixed in 3.
   Truth is, I would have kept the mouth shut if there hadn't been such a
sweeping statement about the effects on people who are unknown to you.
   I hope that answers your question.

^ permalink raw reply	[flat|nested] 29+ messages in thread
* Re: RFA: Deprecate C++ options
@ 2001-09-07 10:06 Benjamin Kosnik
  0 siblings, 0 replies; 29+ messages in thread
From: Benjamin Kosnik @ 2001-09-07 10:06 UTC (permalink / raw)
  To: gcc

> I'd be much more likely to be in favor of converting gcc sources
> itself to C89.  I.e. do away with PARAMS, remove (int)enum, assume
> stdargs, etc.  In that case, one can use gcc 2.x to build gcc 3.x, and
> then you're happy.

May I live to see the day.

> Moreover, there are fixincludes hacks needed even for supposedly
> compliant system headers, so I don't think we'll ever be able to get
> rid of that.  At which point I don't think we're gaining much in the
> way of maintenance improvement.

Right. This is tilting at windmills: some kind of fixincludes is going
to be necessary regardless of C89/C99 conformance. (Note we need
fixincludes anyway, because some vendor headers have incorrect with
respect to C99 bits.)

> > -fno-for-scope
> > -fcheck-new
> > -fno-operator-names

I vote for these to go as well. My general position, I reiterate, is
for a standards-conformant compiler by default. I think kidding
ourselves that flags to change the C++ ABI are necessary or even
useful is a delusional mistake.

-benjamin

^ permalink raw reply	[flat|nested] 29+ messages in thread
* Re: RFA: Deprecate C++ options
@ 2001-09-07 10:13 Benjamin Kosnik
  2001-09-09 14:22 ` Mark Mitchell
  0 siblings, 1 reply; 29+ messages in thread
From: Benjamin Kosnik @ 2001-09-07 10:13 UTC (permalink / raw)
  To: gcc

> Right.  I would say my three personal pet peeves, in order, as a C++
> user, are correctness, compile times, and robustness in the face of
> errors.

So then. 

I'm assuming correctness is being taken care of with the parser rewrite? 

Compile times can/could be taken care of with a combination of some of
the inlining work plus pre compiled headers. 

I think it might be wise to establish a target for a release that
incorporates some of these more far-reaching solutions.

-benjamin

^ permalink raw reply	[flat|nested] 29+ messages in thread
* RE: RFA: Deprecate C++ options
@ 2001-09-10  1:20 Bernard Dautrevaux
  0 siblings, 0 replies; 29+ messages in thread
From: Bernard Dautrevaux @ 2001-09-10  1:20 UTC (permalink / raw)
  To: 'Jason Merrill', Nathan Sidwell; +Cc: gcc, mark

Hi,

I just get in the thread today, and want to add some points.


> -----Original Message-----
> From: Jason Merrill [ mailto:jason_merrill@redhat.com ]
> Sent: Friday, September 07, 2001 10:29 PM
> To: Nathan Sidwell
> Cc: gcc@gcc.gnu.org; mark@codesourcery.com
> Subject: Re: RFA: Deprecate C++ options
> 
> 
> >>>>> "Nathan" == Nathan Sidwell <nathan@codesourcery.com> writes:
> 
> > Support of old ARM conformant code
> > -fno-for-scope
> > 	the for loop variable's scope extends beyond the loop
> 
> The default tries to support both new and old semantics, with 
> a warning if
> code depends on the old semantics.  This seems ideal to me; I 
> don't much
> care if -fno-for-scope goes away, so long as the default 
> stays the same.
> 
> In general, I feel strongly that we should accept old code 
> with a pedwarn
> if at all reasonable.  If that is for some reason not 
> feasible, such as a
> conflict between old and new semantics, then I can accept 
> breaking old code
> with helpful comments to suggest how the user ought to fix 
> their code.  I
> am against just removing previous functionality and leaving 
> users to wonder
> why their code doesn't work anymore.
> 

I think we must first warn the users that old for scope will soon no more be
supported, then (in 3.2?) change that to an error (with explicit mention of
the fact it *was* an no more supported feature). In a later release (say
3.5) we can then simplify the error message if we think it's no more needed.


> > -fcheck-new
> > 	cope with operator new returning null, rather than throwing
> > 	The interaction of this with the builtin operator new and
> > 	-fno-exceptions confuses users.
> 
> I think the confusion is that -fno-exceptions should set 
> flag_check_new,
> and it currently doesn't.  But I haven't seen any messages about this.

I 200% agree. When running in no-exception mode, if users want to be able to
handle out-of-memory errors contextually the only way to work is
-fcheck-new. And that is especially of all those, like me, that use C++ in
embedde real-time contexts, where out-of-memory is a event that must be
taken care of, but where exceptions may not yet be usable.

> 
> > -fno-operator-names
> > 	don't have `and' `or' etc as keywords
> 
> This seems harmless; I don't see any need to remove it.

Me neither, although I've never used them :-)

> 
> > Bug workaround. Are there many access control bugs? I can't 
> recall any
> > in GNATs off hand.
> > -fno-access-control
> > 	don't check access
> 
> This also seems harmless.

Agreed

> 
> > Unknown.
> > -fno-elide-constructors
> > 	don't elide copy ctors What is the rationale for this? I'd've
> > 	thought -O0 would be a suitable switch for this.
> 
> Most optimizations can be controlled by flags other than -On. 
>  Why not this
> one?  I have considered that perhaps this optimization should be off
> at -O0, but it's standard enough that I think it should 
> always be on by
> default.

Don't see any interest in suppressing just the option; either the
optimisation is always needed (and I don't know why it should be) and even
-O0 should do it, either it can be suppressed and -O0 may suppress it but a
specific option would be nice alse (especially if -O0 still does this if
deemed innocent enough)

> 
> It seems to me that you want to remove functionality just 
> because you don't
> think it's necessary.  I disagree with that.  IMO, 
> functionality should
> only be removed if it's a significant maintenance burden.  
> Why should we
> gratuitously make users' lives more difficult?


Agreed,

	Bernard

--------------------------------------------
Bernard Dautrevaux
Microprocess Ingenierie
97 bis, rue de Colombes
92400 COURBEVOIE
FRANCE
Tel:	+33 (0) 1 47 68 80 80
Fax:	+33 (0) 1 47 88 97 85
e-mail:	dautrevaux@microprocess.com
		b.dautrevaux@usa.net
-------------------------------------------- 

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2001-09-18  9:06 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-06  3:40 RFA: Deprecate C++ options Nathan Sidwell
2001-09-06 14:43 ` Mark Mitchell
2001-09-06 15:14   ` Tim Hollebeek
2001-09-06 15:21     ` Joseph S. Myers
2001-09-06 18:23       ` Mark Mitchell
2001-09-06 21:55         ` Zack Weinberg
2001-09-06 22:00           ` Mark Mitchell
2001-09-06 22:11             ` Richard Henderson
2001-09-06 23:50             ` Zack Weinberg
2001-09-06 22:14           ` Richard Henderson
2001-09-06 22:20             ` Mark Mitchell
2001-09-18  4:44               ` Joseph S. Myers
2001-09-18  9:06                 ` Mark Mitchell
2001-09-06 23:46             ` Zack Weinberg
2001-09-07  0:03               ` Richard Henderson
2001-09-06 19:16       ` Joe Buck
2001-09-07  8:52   ` George Garvey
2001-09-07  9:03     ` Mark Mitchell
2001-09-07 13:40 ` Jason Merrill
2001-09-10  9:28   ` Nathan Sidwell
2001-09-07  9:41 George Garvey
2001-09-07 10:00 ` Mark Mitchell
2001-09-12  6:27 ` Gerald Pfeifer
2001-09-14  4:02   ` George Gargey
2001-09-14  5:16     ` Gerald Pfeifer
2001-09-07 10:06 Benjamin Kosnik
2001-09-07 10:13 Benjamin Kosnik
2001-09-09 14:22 ` Mark Mitchell
2001-09-10  1:20 Bernard Dautrevaux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).