Pelles C > Bug reports

PellesC V12RC1 function __unreachable() defined as intrinsic and in intrin.h

(1/2) > >>

frankie:
The intrinsic function
--- Code: ---_INTRIN_X86_X64_(void __unreachable(void))
--- End code ---
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:

--- Quote ---PellesC\Include\intrin.h(218): error #2119: Redeclaration of '__unreachable', previously declared at <no source>.

--- End quote ---

Pelle:
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).

John Z:
V12RC1 on Windows 11 installed perfectly.

I also do get the previously mentioned
--- Code: ---PellesC_v12\Include\intrin.h(218): error #2119: Redeclaration of '__unreachable', previously declared at <no source>.
--- End code ---
error message.
Here are the includes used:
--- Code: ---#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);
--- End code ---

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:

--- Code: ---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)

--- End code ---

Pelle:

--- Quote from: John Z on March 30, 2023, 03:09:50 PM ---I also do get the previously mentioned
--- Code: ---PellesC_v12\Include\intrin.h(218): error #2119: Redeclaration of '__unreachable', previously declared at <no source>.
--- End code ---
error message.

--- End quote ---
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...)

John Z:
here they are, extracted from the ppj -

--- Code: ---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#

--- End code ---

If easier I can post picture, or entire ppj..

John Z

Navigation

[0] Message Index

[#] Next page

Go to full version