On 06/25/13 21:05, Kai Tietz wrote:
> Ok, patch is ok.  I would like that Jacek takes a closer look to it, too.

I still don't get, why we need those functions in crt. I retested and:

- -fno-inline is not a problem here. We use always_inline attribute and
it works fine, whatever compiler/linker options I tried without having
those in crt.
- MSVC does not allow referencing them by pointer. This simple example:

#include <intrin.h>

int main() {
    return (long)__stosb;
}

causes undefined reference to __stosb on MSVC. Why would we want to
allow it?


About the patch itself (forgetting my question and assuming we really
want to support that):

1.

+/* These definitions are duplicated from intrin.h.  This is done
+to be compatible with MS's winnt.h which also does this.  To avoid
+unnecessary duplication, they are only defined here if intrin.h is 
+not included.
+
+Unless intrin.h is included elsewhere, any usage of these functions 
+will be resolved from the library rather than performed inline.  See the 
+comments at the top of intrin.h for more details. */


This is not acceptable IMO. This is way too common in Windows world to include 
only windows.h-like headers and use Interlocked* functions. We should support 
this as first-class code, not using some sort of fallback.

Also, you use C++ ("//") comments all over the place. This will cause warnings 
in strict C89 mode. We already have some such comments, so this may be fine.



Thanks for your work!
Jacek


------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to