bugGNU Octave - Bugs: bug #50265, warnings for use of...

 
 

bug #50265: warnings for use of clean_up_and_exit function

Submitter:  Rik <rik5>
Submitted:  Thu 09 Feb 2017 05:26:56 PM UTC
   
 
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 01 Mar 2017 10:42:10 AM UTC, comment #7: 

Just for the files: the patch of comment #6 works for me, there are no more warnings.

Kai Torben Ohlhus <siko1056>
Group Member
Sun 26 Feb 2017 09:36:20 PM UTC, comment #6: 

I changed two instances of bool to int and the code now compiles without warnings.  I assume that's good enough so I checked that change in under jwe's name here (http://hg.savannah.gnu.org/hgweb/octave/rev/3de5efeffb86).

Rik <rik5>
Group administrator
Sat 25 Feb 2017 04:01:29 AM UTC, comment #5: 

Yeah, oops,just change bool to int in the C interface and it should work.

John W. Eaton <jwe>
Group administrator
Sat 25 Feb 2017 03:40:42 AM UTC, comment #4: 

The patch doesn't compile for me.  Apparently bool is used in a 'C' context rather than a C++ context.


  CC       liboctave/cruft/misc/liboctave_cruft_libcruft_la-cquit.lo
ar: `u' modifier ignored since `D' is the default (see `U')
In file included from liboctave/cruft/misc/cquit.c:30:0:
liboctave/cruft/misc/quit.h:193:47: error: unknown type name 'bool'
 octave_throw_exit_exception (int exit_status, bool safe_to_return);
                                               ^
Makefile:15998: recipe for target 'liboctave/cruft/misc/liboctave_cruft_libcruft_la-cquit.lo' failed
make[2]: *** [liboctave/cruft/misc/liboctave_cruft_libcruft_la-cquit.lo] Error 1
make[2]: *** Waiting for unfinished jobs....


Rik <rik5>
Group administrator
Fri 24 Feb 2017 10:46:56 PM UTC, comment #3: 

Since that call happens inside octave_rethrow_exception, I think it should throw an exit exception instead of just calling exit.  Something like the attached patch?  I added the extern "C" wrapper function for consistency.  These functions allow some exceptions to be thrown from C code but I'm not sure whether we really need that or that it is useful/desirable/safe/etc.


(file #39825)

John W. Eaton <jwe>
Group administrator
Fri 24 Feb 2017 06:28:17 PM UTC, comment #2: 

I've attached a changeset which replaces the call to the deprecated function clean_up_and_exit with a direct call to exit().  JWE should probably review since I don't know if that is the right strategy.

(file #39822)

Rik <rik5>
Group administrator
Wed 15 Feb 2017 09:07:26 AM UTC, comment #1: 

Here, I get the very same warning. Maybe it is connected to cset http://hg.savannah.gnu.org/hgweb/octave/rev/9f406f0b36da .
There, jwe writes:


* quit.h, quit.cc (clean_up_and_exit): Deprecate.  Simply exit.


Maybe a line of the desired cset is missing? If jwe confirms, I can push a fix for this warning.

Kai Torben Ohlhus <siko1056>
Group Member
Thu 09 Feb 2017 05:26:56 PM UTC, original submission:  

When building recent development versions of Octave I see the following warnings
:


liboctave/cruft/misc/quit.cc:108:11: warning: 'void clean_up_and_exit(int, bool)' is deprecated: see the Octave documentation for other options [-Wdeprecated-declarations]
liboctave/cruft/misc/quit.cc:108:11: warning: 'void clean_up_and_exit(int, bool)' is deprecated: see the Octave documentation for other options [-Wdeprecated-declarations]
liboctave/cruft/misc/quit.cc:109:66: warning: 'void clean_up_and_exit(int, bool)' is deprecated: see the Octave documentation for other options [-Wdeprecated-declarations]


The are all associated with a single instance of clean_up_and_exit in liboctave.


        case octave_quit_exception:
          clean_up_and_exit (octave_exit_exception_status,
                             octave_exit_exception_safe_to_return);
          break;


Seems pretty easy to fix, but I don't know what function now replaces clean_up_and_exit().

Rik <rik5>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #39825:  diffs.txt added by jwe (1KiB - text/plain)
file #39822:  bug_50265.cset added by rik5 (900B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Updated the item)
  • -email is unavailable- added by siko1056 (Posted a comment)
  • -email is unavailable- added by siko1056 (Author of the cset.)
  • -email is unavailable- added by rik5 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-02-26 rik5 StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2017-02-24 jwe Attached File- Added diffs.txt, #39825
    2017-02-24 rik5 Attached File- Added bug_50265.cset, #39822
        StatusNeed Info Patch Submitted
    2017-02-15 siko1056 StatusNone Need Info
        Carbon-Copy- Added jwe

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code