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]
Other format: [Raw text]

Re: [using gcc book] ch5.6 referring to a type with typeof


Chris Devers <cdevers@pobox.com> writes:

> In section 5.6, we have the following paragraph:
>
>     The reason for using names that start with underscores for
>     the local variables is to avoid conflicts with variable names
>     that occur within the expressions that are substituted for
>     'a' and 'b'. Eventually we hope to design a new form of
>     declaration syntax that allows you to declare variables whose
>     scopes start only after their initializers; this will be a
>     more reliable way to prevent such conflicts.

The new declaration syntax never got designed, and no one currently
has any intention of designing any such thing.  We are now a lot more
cautious about accepting extensions to the C language than we were
when this part of the manual was originally drafted.  So I would
strike out all discussion of that.

>     Names that start with underscores for the local variables are
>     used to avoid conflicts with variable names occurring within
>     the expressions that are substituted for 'a' and 'b'.

Except this isn't strongly worded enough.  Suggested text:

     Names that start with underscores are used for the local
     variables, to reduce the risk of conflict with variable names
     occurring within the expressions that are substituted for 'a'
     and 'b'.  There is no way to eliminate this risk entirely, but
     by sticking to a naming convention you can avoid it in practice.

zw


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