![]() |
![]() |
0683 | ![]() |
||||
![]() | |||||||
| Constraint violations | REFERENCE - ISO:C90-6.5.7 Initialization - Semantics, ISO:C90-6.3.16.1 Simple Assignment - Constraints | ||||||
This is a constraint error An object of type 'char', 'signed char', 'unsigned char' or 'wchar_t' is being initialized with a wide string literal. A wide string literal has type 'array of wchar_t' and can only be used to initialise an object of compatible pointer type or array type. An object of type wchar_t can only be initialised with an integral constant expression, for example a wide character constant. For example:
/*PRQA S 284,753,878,2017,2213,3122,3123,3211,3408,3410,3429,3453,3674 ++*/
#include <stddef.h>
wchar_t wc1 = L'ab'; /* OK */
wchar_t wc2 = L"ab"; /* Message 0683 */
wchar_t * wp1 = L"ABCDEF"; /* OK */
wchar_t * w[] = {L"ABCDEF"}; /* OK */
See also:
![]() | ||
| QA·C Source Code Analyser 8.1.2
© 2013 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | Contents |