RE: test for restrict fails with MS compiler

2007-07-22 Thread Jerker Bäck
In Interix SDK docs about mmap, quote: ## MAP_FIXED The pointer returned by the function must be equal to addr. Normally, the returned pointer is derived from the addr but does not have to be identical. This is the least portable way of coding with the function. ... [EINVAL] The o

Re: test for restrict fails with MS compiler

2007-07-22 Thread Ralf Wildenhues
Hello Jerker, * Jerker Bäck wrote on Fri, Jul 20, 2007 at 03:36:32PM CEST: > > Well, maybe you're right. I will be using the MS implementation of restrict > and see if I run into problems. There could be a risk of wrong optimization > - we'll see. I would doubt that MSVC does wrong optimizations

RE: test for restrict fails with MS compiler

2007-07-20 Thread Jerker Bäck
Hello Ralf, I seem to have a habit of forgetting to add the group > . Ah, I see where you got this from. Well, maybe you're right. I will be using the MS implementation of restrict and see if I run into problems. There could be a

RE: test for restrict fails with MS compiler

2007-07-19 Thread Jerker Bäck
Hello Ralf, > You would have a case with this first issue if you could prove that > defining away `restrict' is a problem with MSVC. No, it should not cause any problem. > Second, a claim that MSVC fully implements restrict as conforming to > C99, is wrong, we've gone through this before. Yo

Re: test for restrict fails with MS compiler

2007-07-19 Thread Ralf Wildenhues
Hello Jerker, FYI, I've Cc:ed the list again. * Jerker Bäck wrote on Thu, Jul 19, 2007 at 04:34:56PM CEST: > > > You would have a case with this first issue if you could prove that > > defining away `restrict' is a problem with MSVC. > > No, it should not cause any problem. OK, good. So thi

Re: test for restrict fails with MS compiler

2007-07-19 Thread Ralf Wildenhues
Hello Jerker, * Jerker Bäck wrote on Thu, Jul 19, 2007 at 11:36:07AM CEST: > > > As Ralf said, `AC_C_RESTRICT' supports your compiler precisely as > > intended: it defines away the `restrict' keyword, which your > > compiler implements incorrectly > > No, I'm not so sure about that. Indeed, I'm

RE: test for restrict fails with MS compiler

2007-07-19 Thread Jerker Bäck
Hello Noah, > As Ralf said, `AC_C_RESTRICT' supports your compiler precisely as intended: > it > defines away the `restrict' keyword, which your compiler implements > incorrectly No, I'm not so sure about that. Indeed, I'm convinced the compiler implements the keyword exactly as intended. Further

Re: test for restrict fails with MS compiler

2007-07-18 Thread Noah Misch
On Wed, Jul 18, 2007 at 02:31:50PM +0200, Jerker B?ck wrote: > Hello Ralf, > > Is there a misunderstanding here? Autoconf supports MSVC wrt. restrict: > > it will add > > #define restrict > > to config.h which will cause code like in the configure test to be > > compiled successfully by MSVC, n

RE: test for restrict fails with MS compiler

2007-07-18 Thread Jerker Bäck
Hello Ralf, First, I feel I need to explain the basic problem. There is at this moment just two compilers for x86_64 PE: The Intel and the MS compilers. The Intel Compiler is said to be ISO C99-conforming. However, this compiler produce applications with special start-up routines (from libirc.lib)

Re: test for restrict fails with MS compiler

2007-07-13 Thread Ralf Wildenhues
Hello Jerker, * Jerker Bäck wrote on Tue, Jul 10, 2007 at 06:23:21PM CEST: > Hello Ralf, > > That would be a bug in MSVC, right? > Generally speaking, the error have not so much to do with the restrict > keyword. This only affects when you typedef a custom type and later try to > change its behavi

RE: test for restrict fails with MS compiler

2007-07-10 Thread Jerker Bäck
Hello Ralf, > That would be a bug in MSVC, right? Generally speaking, the error have not so much to do with the restrict keyword. This only affects when you typedef a custom type and later try to change its behaviour. The MS compiler is known to look deep when preprocess and make warnings or errors

Re: test for restrict fails with MS compiler

2007-07-10 Thread Ralf Wildenhues
Hello Erik, * Jerker Bäck wrote on Tue, Jul 10, 2007 at 03:28:33PM CEST: > The MS compiler fails the test for the __restrict keyword > > Like this: > typedef int * int_ptr; > int foo (int_ptr __restrict ip) // C2219: syntax error > > But this works OK: > typedef int * __restrict

test for restrict fails with MS compiler

2007-07-10 Thread Jerker Bäck
The MS compiler fails the test for the __restrict keyword Like this: typedef int * int_ptr; int foo (int_ptr __restrict ip) // C2219: syntax error But this works OK: typedef int * __restrict int_ptr; int foo (int_ptr ip)// OK which make sense - not allowing c