-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Fix strict aliasing violation from conditional typedef of wchar_t by building entire project as C++ for Unix #6801
Changes from all commits
0410f82
c23442e
1a834aa
12117fa
c8636c1
996d76b
e9f21e5
08e3ef2
f8bc275
c40cbdd
87a438f
14f441f
70f9195
651ce9b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,7 +20,7 @@ | |
| #include "mbusafecrt_internal.h" | ||
|
|
||
| typedef int (*INPUTFN)(miniFILE *, const unsigned char*, va_list); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should the
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It should already be correct signature. I thought only wide char needed consistency. |
||
| typedef int (*WINPUTFN)(miniFILE *, const unsigned short*, va_list); | ||
| typedef int (*WINPUTFN)(miniFILE *, const wchar_t*, va_list); | ||
|
|
||
|
|
||
| /*** | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,7 +26,12 @@ else() | |
| message(FATAL_ERROR "Only ARM, ARM64 and AMD64 is supported") | ||
| endif() | ||
|
|
||
| # C++ emits errors and warnings for c-string literal fed into char* parameter | ||
| # this is just to take care of the warnings | ||
| add_compile_options(-Wno-writable-strings) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we have this issue at many places? I would prefer fixing the code if it happens at only a few spots.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There were too many testcases that feed char literal to char* parameter. |
||
|
|
||
| add_compile_options(-Wno-empty-body) | ||
|
|
||
| add_subdirectory(palsuite) | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this define needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was undefind reference error when linking executable crossgen: