Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #28751

Re: inline functions

From James Kuyper <jameskuyper@verizon.net>
Newsgroups comp.lang.c
Subject Re: inline functions
Date 2012-11-28 16:40 -0500
Organization A noiseless patient Spider
Message-ID <50B684C5.10109@verizon.net> (permalink)
References (2 earlier) <ON5ss.547483$9H4.97721@fx17.am4> <87624v6kly.fsf@dpt-info.u-strasbg.fr> <c2857271-6c38-4e2f-8af6-28a47f929bf8@p17g2000vbn.googlegroups.com> <Fd6dnWil9-L98S7NnZ2dnUVZ7oSdnZ2d@lyse.net> <slrnkbd0d4.1jc.grahn+nntp@frailea.sa.invalid>

Show all headers | View raw


On 11/28/2012 04:27 PM, Jorgen Grahn wrote:
> On Mon, 2012-11-26, David Brown wrote:
> ...
>> To get good code, it is 
>> important to give the compiler freedom to generate it's best code - that 
>> means [...] and either turning off debug information generation, 
>> or at least picking the most expressive possible debug format (so that 
>> the compiler does not restrict code generation to suit debugger 
>> capabilities).
> 
> Do any compilers still work that way?  Which ones? I remember fighting
> that idea fifteen years ago.  People kept saying
> 
>    "We can't enable debug symbols, because that would disable
>    optimization."
> 
> or the dreaded
> 
>    "We'll enable optimization later, when we ship the code. We can't
>    do it now, because it would disable debug information."
> 
> even though our particular compiler's documentation clearly showed
> that these were unrelated settings.
> 
> Come to think of it, the fight is still ongoing.  Only a month ago I
> enabled optimization for a piece of performance-critical code.

It's not just a matter of ancient compilers that can't combine debugging
with optimization. In my experience, debugging code that has been
significantly optimized is both quite possible, and exceedingly
difficult, because the code that I'm watching behaves quite differently
from the code that I wrote. One of the first things I do, when debugging
appears to be necessary, is to determine whether the bug disappears when
optimizations are turned off. If it doesn't, I normally leave them
turned off during debugging, for the sake of my own sanity.

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

inline functions "BartC" <bc@freeuk.com> - 2012-11-24 12:20 +0000
  Re: inline functions SG <sgesemann@gmail.invalid> - 2012-11-24 14:52 +0100
    Re: inline functions "BartC" <bc@freeuk.com> - 2012-11-24 14:48 +0000
      Re: inline functions Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl> - 2012-11-24 15:59 +0100
      Re: inline functions Alain Ketterlin <alain@dpt-info.u-strasbg.fr> - 2012-11-24 16:25 +0100
      Re: inline functions Johann Klammer <klammerj@NOSPAM.a1.net> - 2012-11-24 19:18 +0100
  Re: inline functions Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-11-24 15:07 +0000
    Re: inline functions "BartC" <bc@freeuk.com> - 2012-11-24 15:33 +0000
      Re: inline functions Alain Ketterlin <alain@dpt-info.u-strasbg.fr> - 2012-11-24 17:17 +0100
        Re: inline functions "BartC" <bc@freeuk.com> - 2012-11-24 16:39 +0000
          Re: inline functions Alain Ketterlin <alain@dpt-info.u-strasbg.fr> - 2012-11-24 18:13 +0100
            Re: inline functions Jens Gustedt <jens.gustedt@loria.fr> - 2012-11-24 19:36 +0100
              Re: inline functions Sergio Durigan Junior <sergiodj@riseup.net> - 2012-12-05 03:19 -0200
                Re: inline functions Jens Gustedt <jens.gustedt@loria.fr> - 2012-12-05 10:57 +0100
                Re: inline functions Sergio Durigan Junior <sergiodj@riseup.net> - 2012-12-05 15:34 -0200
        Re: inline functions Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-11-25 09:43 +0000
          Re: inline functions Alain Ketterlin <alain@dpt-info.u-strasbg.fr> - 2012-11-25 11:32 +0100
            Re: inline functions Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-11-27 21:55 +0000
        Re: inline functions "christian.bau" <christian.bau@cbau.wanadoo.co.uk> - 2012-11-26 04:16 -0800
          Re: inline functions David Brown <david@westcontrol.removethisbit.com> - 2012-11-26 14:13 +0100
            Re: inline functions Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-11-28 21:27 +0000
              Re: inline functions James Kuyper <jameskuyper@verizon.net> - 2012-11-28 16:40 -0500
                Re: inline functions Ben Pfaff <blp@cs.stanford.edu> - 2012-11-28 14:15 -0800
                Re: inline functions Sergio Durigan Junior <sergiodj@riseup.net> - 2012-11-29 00:02 -0200
                Re: inline functions Malcolm McLean <malcolm.mclean5@btinternet.com> - 2012-11-29 07:24 -0800
                Re: inline functions James Kuyper <jameskuyper@verizon.net> - 2012-11-29 11:04 -0500
                Re: inline functions Sergio Durigan Junior <sergiodj@riseup.net> - 2012-11-29 14:44 -0200
                Re: inline functions Les Cargill <lcargill99@comcast.com> - 2012-11-29 12:44 -0600
                Re: inline functions Sergio Durigan Junior <sergiodj@riseup.net> - 2012-11-29 20:43 -0200
                Re: inline functions Les Cargill <lcargill99@comcast.com> - 2012-11-29 20:14 -0600
                Re: inline functions Ian Collins <ian-news@hotmail.com> - 2012-11-30 07:44 +1300
                Re: inline functions Sergio Durigan Junior <sergiodj@riseup.net> - 2012-11-29 20:38 -0200
                Re: inline functions Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-12-05 03:17 +0000
                Re: inline functions Noob <root@127.0.0.1> - 2012-12-05 11:26 +0100
      Re: inline functions David Brown <david@westcontrol.removethisbit.com> - 2012-11-26 11:23 +0100
        Re: inline functions "BartC" <bc@freeuk.com> - 2012-11-26 13:01 +0000
          Re: inline functions David Brown <david@westcontrol.removethisbit.com> - 2012-11-26 14:24 +0100
            Re: inline functions Malcolm McLean <malcolm.mclean5@btinternet.com> - 2012-11-26 05:35 -0800
              Re: inline functions Les Cargill <lcargill99@comcast.com> - 2012-11-26 07:57 -0600
                Re: inline functions Malcolm McLean <malcolm.mclean5@btinternet.com> - 2012-11-26 07:07 -0800
              Re: inline functions Rosario1903 <Rosario@invalid.invalid> - 2012-11-27 09:46 +0100
              Re: inline functions David Brown <david@westcontrol.removethisbit.com> - 2012-11-27 10:50 +0100
            Re: inline functions "BartC" <bc@freeuk.com> - 2012-11-26 14:14 +0000
              Re: inline functions "BartC" <bc@freeuk.com> - 2012-11-26 15:14 +0000
              Re: inline functions Rosario1903 <Rosario@invalid.invalid> - 2012-11-27 09:46 +0100
                Re: inline functions "BartC" <bc@freeuk.com> - 2012-11-27 14:41 +0000
              Re: inline functions David Brown <david@westcontrol.removethisbit.com> - 2012-11-27 11:01 +0100
                Re: inline functions "BartC" <bc@freeuk.com> - 2012-11-27 14:37 +0000
                Re: inline functions Alain Ketterlin <alain@dpt-info.u-strasbg.fr> - 2012-11-27 18:22 +0100
                Re: inline functions James Kuyper <jameskuyper@verizon.net> - 2012-11-27 12:55 -0500
                Re: inline functions Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-11-27 22:06 +0000
                Re: inline functions David Brown <david@westcontrol.removethisbit.com> - 2012-11-29 09:47 +0100
          Re: inline functions glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-11-26 14:39 +0000
  Re: inline functions Malcolm McLean <malcolm.mclean5@btinternet.com> - 2012-11-24 07:20 -0800
    Re: inline functions James Kuyper <jameskuyper@verizon.net> - 2012-11-24 10:44 -0500
  Re: inline functions James Kuyper <jameskuyper@verizon.net> - 2012-11-24 10:35 -0500
  Re: inline functions Philip Lantz <prl@canterey.us> - 2012-11-24 22:56 -0800
  Re: inline functions James Dow Allen <jdallen2000@yahoo.com> - 2012-11-25 01:18 -0800

csiph-web