9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Yoann Padioleau <pad@fb.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] copy paste bug in cc.y?
Date: Fri, 17 Oct 2014 17:48:46 +0000	[thread overview]
Message-ID: <F8114E49-B8EF-4D74-8BDB-15B99BEB97E9@fb.com> (raw)
In-Reply-To: <CAKzdPgwT_Q+GMYzDrwcOL3RUEqdph7BY+rPSVYLDxc2sdsg8Vg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1533 bytes --]

Somehow?

Would be nice to have a comment explaining this “somehow" then
because it looks tricky.

Also is there a place explaining the naming conventions?
I have a hard time understanding what is the difference
between tcom(), acom(), xcom(), and then there’s  complex() …


On Oct 14, 2014, at 5:50 PM, Rob Pike <robpike@gmail.com<mailto:robpike@gmail.com>> wrote:

It's not dead code. It's prepping the switch somehow.

-rob


On Tue, Oct 14, 2014 at 3:45 PM, Rob Pike <robpike@gmail.com<mailto:robpike@gmail.com>> wrote:
Looks like it.

-rob


On Tue, Oct 14, 2014 at 3:11 PM, Yoann Padioleau <pad@fb.com<mailto:pad@fb.com>> wrote:
Hi,

It’s a copy paste bug here right?
https://code.google.com/p/ken-cc/source/browse/src/cmd/cc/cc.y#476<https://urldefense.proofpoint.com/v1/url?u=https://code.google.com/p/ken-cc/source/browse/src/cmd/cc/cc.y%23476&k=ZVNjlDMF0FElm4dQtryO4A%3D%3D%0A&r=%2FN9d7W2LRwZks3eyFNLr8Q%3D%3D%0A&m=4cyv139G%2BaY3rKB1R87WcxrtStd7gWlsDg4w5ndKAww%3D%0A&s=0dfb82e35769784cecce2b03828c23174d1f09519028880890cc63d7dd24265c>


|       LSWITCH '(' cexpr ')' stmnt

        {

                $$ = new(OCONST, Z, Z);

                $$->vconst = 0;

                $$->type = types[TINT];

                $3 = new(OSUB, $$, $3);



                $$ = new(OCONST, Z, Z);

                $$->vconst = 0;

                $$->type = types[TINT];

                $3 = new(OSUB, $$, $3);



                $$ = new(OSWITCH, $3, $5);

        }






[-- Attachment #2: Type: text/html, Size: 8573 bytes --]

  reply	other threads:[~2014-10-17 17:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-14 22:11 Yoann Padioleau
2014-10-14 22:45 ` Rob Pike
2014-10-15  0:50   ` Rob Pike
2014-10-17 17:48     ` Yoann Padioleau [this message]
2014-10-17 19:07       ` Charles Forsyth
2014-10-17 20:00         ` Yoann Padioleau
2014-10-17 20:04           ` minux
2014-10-17 20:32             ` Yoann Padioleau
2014-10-21 17:34         ` Yoann Padioleau
2014-10-21 20:53           ` Charles Forsyth
2014-10-17 21:30       ` Charles Forsyth

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=F8114E49-B8EF-4D74-8BDB-15B99BEB97E9@fb.com \
    --to=pad@fb.com \
    --cc=9fans@9fans.net \
    /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 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 NNTP newsgroup(s).