Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #1097 (assigned defect)

Opened 2 months ago

Last modified 1 month ago

patch: text.Util warning free on x86_64

Reported by: Krox Assigned to: kris (accepted)
Priority: major Milestone: 1.0
Component: Tango Version: trunk
Keywords: Cc:

Description

Replaced uint with size_t at alot of places, which resolves all warnings I encountered on Linux x86_64.

In addition, I changed the functions trim[r|l] and strip[r|l] so they can be evaluated at compile time. (Now they use array-indices instead of pointers).

Attachments

tango.text.Util.d.diff (12.4 kB) - added by Krox on 05/10/08 15:22:13.
text.Util.d.diff

Change History

05/10/08 15:22:13 changed by Krox

  • attachment tango.text.Util.d.diff added.

text.Util.d.diff

05/10/08 18:49:26 changed by larsivi

I see you have changed pointer use to non-pointer array manipulation. Whereas this is a worthy goal in itself, I believe the original has been made so for a reason.

So some proof that you're not degrading performance needs to follow those bits of the patch. I understand that this probably is the easiest (and cleanest) way to get rid of the relevant warnings though.

05/11/08 05:25:07 changed by Krox

I looked at the asm output of the trim!(char) function (GDC 0.24) and you might be right. With -O0, the array-approach is much slower of course. With -O2, its slower too, but only because it performs bounds-checking all the time. With -O2 and -fno-bounds-check its very near to equal, but you don't want to do that in normal cases.

So... It was just a suggestion, leave out the modifications for trim/strip, if you want to, no problem. (The original versions didn't produce any warnings, so that's fine).

All other modifications only change the type of some variables, no implementation is changed.

05/26/08 01:30:04 changed by kris

  • status changed from new to assigned.
  • milestone changed from 0.99.7 to 1.0.

moving to a specific release for x64 support (1.0 is just a placeholder)