Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1663)

Issue 5294071: code review 5294071: Change the name of cas() in cc to newcase() to avoid a ... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 5 months ago by rminnich
Modified:
13 years, 5 months ago
Reviewers:
CC:
rsc1, golang-dev
Visibility:
Public.

Description

Change the name of cas() in cc to newcase() to avoid a NIX conflict. cas() is used in cc to create a new Case struct. There is a name conflict in that cas() is a commonly-used name for compare and swap. Since cas() is only used internally in the compiler in 3 places, change the name to avoid a wider conflict with the NIX runtime. This issue might well come up on other OSes in the future anyway, as the name is fairly common.

Patch Set 1 #

Patch Set 2 : diff -r 3fe4f3f34e9b https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 3fe4f3f34e9b https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r 3f647c45f84d https://go.googlecode.com/hg/ #

Patch Set 5 : diff -r 3f647c45f84d https://go.googlecode.com/hg/ #

Patch Set 6 : diff -r 3f647c45f84d https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -7 lines) Patch
M src/cmd/5c/gc.h View 1 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/6c/gc.h View 1 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/8c/gc.h View 1 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/cc/pgen.c View 1 3 chunks +3 lines, -3 lines 0 comments Download
M src/cmd/cc/pswt.c View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 3
rminnich
Hello rsc@google.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
13 years, 5 months ago (2011-10-26 18:06:45 UTC) #1
rsc1
LGTM
13 years, 5 months ago (2011-10-26 19:59:03 UTC) #2
rsc
13 years, 5 months ago (2011-10-26 22:28:06 UTC) #3
*** Submitted as http://code.google.com/p/go/source/detail?r=e87e3a0335c0 ***

cc: change cas to newcase

Change the name of cas() in cc to newcase() to avoid a NIX conflict.
cas() is used in cc to create a new Case struct. There is a name
conflict in that cas() is a commonly-used
name for compare and swap. Since cas() is only used internally
in the compiler in 3 places, change the name to avoid a wider
conflict with the NIX runtime. This issue might well come up on
other OSes in the future anyway, as the name is fairly common.

R=rsc
CC=golang-dev
http://codereview.appspot.com/5294071

Committer: Russ Cox <rsc@golang.org>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b