M
Mirco Wahab
After reading through some (open) Intel (CPU detection)
C++ source (www.intel.com/cd/ids/developer/asmo-na/eng/276611.htm)
I stumbled upon a sketchy use of multibyte characters
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
260:
unsigned int VendorID[3] = {0, 0, 0};
try // If CPUID instruction is supported
{
...
}
catch (...)
{
...
}
return (
(VendorID[0] == 'uneG') &&
(VendorID[1] == 'Ieni') &&
(VendorID[2] == 'letn')
);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This seems to work, gcc 4.2 emits a warning:
"warning: multi-character character constant"
and Visual C++ 9 says nothing at all.
Whats the matter w/multibyte characters now?
I didn't use them and would be glad to learn
if they are widely implemented and part of
the standard soon/now?
gcc tells us: (http://gcc.gnu.org/onlinedocs/gcc/Characters-implementation.html)
...
[Characters]
...
The value of a wide character constant containing more than
one multibyte character, or containing a multibyte character
or escape sequence not represented in the extended execution
character set (C90 6.1.3.4, C99 6.4.4.4).
...
Regards & Thanks for clearing this
M.
C++ source (www.intel.com/cd/ids/developer/asmo-na/eng/276611.htm)
I stumbled upon a sketchy use of multibyte characters
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
260:
unsigned int VendorID[3] = {0, 0, 0};
try // If CPUID instruction is supported
{
...
}
catch (...)
{
...
}
return (
(VendorID[0] == 'uneG') &&
(VendorID[1] == 'Ieni') &&
(VendorID[2] == 'letn')
);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This seems to work, gcc 4.2 emits a warning:
"warning: multi-character character constant"
and Visual C++ 9 says nothing at all.
Whats the matter w/multibyte characters now?
I didn't use them and would be glad to learn
if they are widely implemented and part of
the standard soon/now?
gcc tells us: (http://gcc.gnu.org/onlinedocs/gcc/Characters-implementation.html)
...
[Characters]
...
The value of a wide character constant containing more than
one multibyte character, or containing a multibyte character
or escape sequence not represented in the extended execution
character set (C90 6.1.3.4, C99 6.4.4.4).
...
Regards & Thanks for clearing this
M.