-
Notifications
You must be signed in to change notification settings - Fork 560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PATCH] MSVC Perl doesn't use noreturn on noreturn functions #12276
Comments
From @bulk88Created by @bulk88I'll post the body through RT web interface. Perl Info
|
From @bulk88I was looking at the assembly code output of XS modules today. I noticed From an ActivePerl 5.10, with -O1 XS module. Same thing happens with the Perl 5.17 that this perlbug was filed with. |
The RT System itself - Status changed from 'new' to 'open' |
From @bulk88Made a (my first ever, not sure if I did it right) git patch to From post preprocessor XS module, __declspec (dllimport, noreturn) __declspec (dllimport, noreturn) __declspec (dllimport, noreturn) _________________________________________ |
From @bulk88 |
@bulk88 - Status changed from 'open' to 'new' |
From @bulk88
I'm forwarding this to p5p since I originally didn't plan to write a patch to fix the problem, but then I decided to write one, and I wasn't sure whether to file a new ticket or not for the patch, (I changed the title though of this ticket) and I don't want this ticket now having a patch attached to get lost. |
From @bulk88 |
From @nwc10On Wed, Jul 18, 2012 at 03:17:34PM -0400, bulk 88 wrote:
Thanks. This is useful. However, I really don't know MSVC, and I'm a bit troubled by the code, as Does this code work on all versions of MSVC? At least all that are new Inline Patchdiff --git a/win32/win32.h b/win32/win32.h
index e906266..2c821eb 100644
--- a/win32/win32.h
+++ b/win32/win32.h
@@ -66,8 +66,14 @@
#if !defined(PERLDLL) && !defined(PERL_EXT_RE_BUILD)
# ifdef __cplusplus
# define PERL_CALLCONV extern "C" __declspec(dllimport)
+# ifdef _MSC_VER
+# define PERL_CALLCONV_NO_RET extern "C" __declspec(dllimport, noreturn)
+# endif
# else
# define PERL_CALLCONV __declspec(dllimport)
+# ifdef _MSC_VER
+# define PERL_CALLCONV_NO_RET __declspec(dllimport, noreturn)
+# endif
# endif
#endif
Nicholas Clark |
The RT System itself - Status changed from 'new' to 'open' |
From @bulk88On Wed Jul 18 12:27:10 2012, nicholas wrote:
I use Visual Studio/C 2003, ActiveState uses Visual C 6 with Platform Looking at this I put the msc_ver checks into win32.h since there was already a ton of I didn't test my patch on Win32 GCC Perl or any other compilers other At the moment for some personal XS code, I "fixed" the problem by having |
From @bulk88A link that says VC 6 has noreturn |
From @janduboisOn Wed, 18 Jul 2012, Nicholas Clark wrote:
It works with VC6 and later, and VC6 is the oldest version we support, http://perl5.git.perl.org/perl.git/commitdiff/12a2785c7 Cheers, |
@jandubois - Status changed from 'open' to 'resolved' |
From @bulk88On Wed Jul 18 15:37:53 2012, jdb wrote:
I realized the noreturn support I wrote was incomplete, it only worked Strangely, I noticed under -Od with VS 2003, MSVC will write in C stack |
From @bulk88 |
@bulk88 - Status changed from 'resolved' to 'open' |
From @janduboisOn Wed Jul 18 15:37:53 2012, jdb wrote:
Not sure if I made some mistake when I tested the original commit, but I've fixed the change with http://perl5.git.perl.org/perl.git/commitdiff/03c98af06f |
From @janduboisOn Thu Jul 19 11:49:12 2012, bulk88. wrote:
Thanks, applied as http://perl5.git.perl.org/perl.git/commitdiff/50e8e1f58 |
@jandubois - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#114144 (status was 'resolved')
Searchable as RT114144$
The text was updated successfully, but these errors were encountered: