[cfe-dev] Pointer Arithmetic

Keith Bauer onesadcookie at gmail.com
Thu Jul 12 02:25:29 PDT 2007


I've been working on pointer arithmetic.  Attached is a patch which
seems to correctly implement (pointer + int), (int + pointer) and
(pointer - int).  (pointer - pointer) doesn't seem to be possible
within the infrastructure that exists, though I'd like confirmation of
this.  See my comments in the patch.

Obviously, since this is my first effort, I'd like comments on what
I've done well and what I've (inevitably) done poorly.  I'm not really
sure of the design or coding conventions of the project.

Also, there's no test-cases.  I haven't figured out how they're
supposed to work yet.

-Keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PointerMath.diff
Type: application/octet-stream
Size: 5430 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20070712/ecc74ec6/attachment.obj>


More information about the cfe-dev mailing list