All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Franke <Christian.Franke@t-online.de>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: Eliminating nested functions
Date: Fri, 17 Apr 2009 23:57:02 +0200	[thread overview]
Message-ID: <49E8FB2E.1080001@t-online.de> (raw)
In-Reply-To: <1239983697.4383.15.camel@mj>

Pavel Roskin wrote:
> I suggest that we eliminate all nested functions.  The reasons are:
>
> 1) They make the code less readable, as they make the parent functions
> longer.
>
> 2) They have problems with some popular compilers, as recent as gcc-4.0
> when regparm(3) is used.
>
> 3) We failed to implement a reliable test for such problems.  We are
> using regparm(1) for all compilers.
>
> 4) The existing test is one of the obstacles making it impossible to
> compile without having libc for the target (x86_64->i386 would be really
> nice), as we need to run the compiled test executable.
>
> 5) Non-i386 architectures define NESTED_FUNC_ATTR as an empty symbol, so
> developers on such architectures don't see if they use it correctly.
>
> 6) NESTED_FUNC_ATTR tends to proliferate to the file scope functions, as
> it happened with grub_pci_iterate().  It only takes one caller using a
> nested function to force NESTED_FUNC_ATTR on all functions used as an
> argument to the same function.
>
>   

7) The grub utils may not run on some 'security hardened' platform which 
does not allow to enable stack execution.


-- 
Christian Franke




  parent reply	other threads:[~2009-04-17 21:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-17 15:54 Eliminating nested functions Pavel Roskin
2009-04-17 19:33 ` Bean
2009-04-17 19:52   ` Vladimir Serbinenko
2009-04-17 21:38   ` Pavel Roskin
2009-04-19  6:38     ` Bean
2009-04-19 14:29       ` Pavel Roskin
2009-04-19 14:51         ` Vladimir Serbinenko
2009-04-19 16:52           ` Bean
2009-04-17 21:57 ` Christian Franke [this message]
2009-04-17 23:17 ` David Miller
2009-04-18 15:57   ` Colin D Bennett
2009-04-19  3:52     ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49E8FB2E.1080001@t-online.de \
    --to=christian.franke@t-online.de \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.