Project

General

Profile

Actions

Bug #1283

closed

rb_f_throw return type

Added by cfis (Charlie Savage) almost 16 years ago. Updated over 13 years ago.

Status:
Closed
Assignee:
-
Target version:
ruby -v:
ruby 1.9.2dev (2009-03-12) [i386-mswin32_90]
Backport:
[ruby-core:22872]

Description

=begin
With VC 2008, -W3:

rb_f_throw is defined as:

static VALUE rb_f_throw(int argc, VALUE *argv)

But then Ruby tells VC that the method never returns (which it doesn't) via __declspec(noreturn).

This results in these two compiler warnings:

c:\development\src\ruby_trunk\vm_eval.c(1146) : warning C4646: function declared with __declspec(noreturn) has non-void return type

c:\development\src\ruby_trunk\vm_eval.c(1168) : warning C4645: function declared with __declspec(noreturn) has a return statement

I've attached a possible patch to fix this - but its likely the wrong solution and the compiler errors are preferable.
=end


Files

vm_eval.patch (1.01 KB) vm_eval.patch cfis (Charlie Savage), 03/13/2009 05:22 PM
Actions

Also available in: Atom PDF

Like0
Like0