The
intrinsic function
_INTRIN_X86_X64_(void __unreachable(void))
is still defined in the header
intrin.h while it has been coded as
intrinsic since PelleC-V11.
A compilation including the header generate the following error:
QuotePellesC\Include\intrin.h(218): error #2119: Redeclaration of '__unreachable', previously declared at <no source>.
Right. For some reason I can't reproduce the error right now, but __unreachable() changed from being an intrinsic and shouldn't be in <intrin.h> (it's now internally a "generic function", and don't need a header at all).
V12RC1 on Windows 11 installed perfectly.
I also do get the previously mentioned
PellesC_v12\Include\intrin.h(218): error #2119: Redeclaration of '__unreachable', previously declared at <no source>.
error message.
Here are the includes used:
#include <windows.h>
#include <windowsx.h>
#include <stdio.h>
#include <intrin.h> // for tick counter value
#include <wchar.h>
BOOL ChkLogExist(char *p_fname);
void GetTime(char *p_time);
void GetTicks(char *p_tick);
New 'Project - 'Add' mode worked very well. I'm locking my add-in post (and pulling source) since intrinsic copy mode is implemented in V12 :) Results look identical ;)
John Z
Maybe unhelpful but searching .h files:
V12RC1
Find "__unreachable".
"C:\Program Files\PellesC_V12\Include\intrin.h" (218) _INTRIN_X86_X64_(void __unreachable(void))
"C:\Program Files\PellesC_V12\Include\stddef.h" (24) #define unreachable() __unreachable()
2 hit(s)
V11.002
Find "__unreachable".
"C:\Program Files\PellesC_V11\Include\intrin.h" (222) _INTRIN_ALL_(void __unreachable(void))
1 hit(s)
Quote from: John Z on March 30, 2023, 03:09:50 PM
I also do get the previously mentioned
PellesC_v12\Include\intrin.h(218): error #2119: Redeclaration of '__unreachable', previously declared at <no source>.
error message.
I assume it's already fixed, but I still can't reproduce this error (with RC1). Do you have the compiler options used? (I guess the CCFLAGS project macro is enough...)
here they are, extracted from the ppj -
CCFLAGS = -Tx86-coff -std:C11 -Ot -Ox -Ob1 -fp:fast -W2 -Gz -Ze -Dunicode -D_unicode -D_WIN32 -DWIN32 -DUNICODE_SUPPORT -DWINDLL -DOUT#
ASFLAGS = -AIA32 -Gz#
RCFLAGS = -DUNICODE -D_UNICODE#
LINKFLAGS = -machine:x86 -subsystem:windows -largeaddressaware -safeseh -version:3.0 kernel32.lib user32.lib gdi32.lib gdiplus.lib comctl32.lib comdlg32.lib advapi32.lib shell32.lib HtmlHelp.lib delayimp.lib winmm.lib ole32.lib oleaut32.lib olepro32.lib uuid.lib version.lib Shlwapi.lib libxlsxio_write.lib UxTheme.lib#
SIGNFLAGS = -location:CU -store:MY -timeurl:http://timestamp.verisign.com/scripts/timstamp.dll -errkill#
INCLUDE = $(PellesCDir)\Include\Win;$(PellesCDir)\Include#
LIB = $(PellesCDir)\Lib\Win;$(PellesCDir)\Lib#
WizCreator = Pelle Orinius#
If easier I can post picture, or entire ppj..
John Z
OK, you need to use a "Win32" (X86) project with a calling convention other than __cdecl to trigger this.
My fix to remove (or comment out) line 218 of <intrin.h>
_INTRIN_X86_X64_(void __unreachable(void))
is correct.
I'm not going to upload RC2 just for this and a few typos in the help file. I will wait a few more weeks/month to see if anything more serious pops up, otherwise I will consider this version done (and upload the final version)...
Makes sense to me. Testers can comment it out or switch calling convention to continue testing if they run into the error message.
John Z