mikeizbicki / subhask

Type safe interface for working in subcategories of Hask
BSD 3-Clause "New" or "Revised" License
418 stars 43 forks source link

Lebesgue.c: fix compile error #12

Closed sw1sh closed 9 years ago

sw1sh commented 9 years ago

Compiler was complaining: error: subscripted value is neither array nor pointer I'm not sure this is correct, fixed by intuition only.

mikeizbicki commented 9 years ago

hmm... what C compiler does your system use?

It looks like the math is correct, but I'll have to check if the speed is affected by these changes at all.

sw1sh commented 9 years ago

I've checked gcc version 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC) and gcc version 4.9.2 20150212 (Red Hat 4.9.2-6) (GCC), both gave the same error.

mikeizbicki commented 9 years ago

Thanks. I'm using gcc-7.2 on Debian. It must be that RedHat has more strict flags turned on by default, which should make the code better.

Again, I think you're patch is correct, and I'll probably merge it. I'll do the performance tests I mentioned sometime next week to make sure it's good.

On Sat, Aug 8, 2015 at 11:20 AM, Nikolai Murzin notifications@github.com wrote:

I've checked gcc version 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC) and gcc version 4.9.2 20150212 (Red Hat 4.9.2-6) (GCC), both gave the same error.

— Reply to this email directly or view it on GitHub https://github.com/mikeizbicki/subhask/pull/12#issuecomment-129031894.

mikeizbicki commented 9 years ago

Everything looked good! Thanks a bunch for fixing this :)