bugGNU Octave - Bugs: bug #54382, char to int conversion fails if...

 
 

bug #54382: char to int conversion fails if OCTAVE_HAVE_OVERLOAD_CHAR_INT8_TYPES is not defined

Submitted by:  John W. Eaton <jwe>
Submitted on:  Thu 26 Jul 2018 12:55:05 PM UTC  
 
Category:  Libraries Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  dev Operating System:  Solaris/SunOS

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 26 Jul 2018 12:55:05 PM UTC, original submission:

The following tests failed on a Solaris build:

This is happening because the overload for constructing intNDArray<T> objects from char is not defined because OCTAVE_HAVE_OVERLOAD_CHAR_INT8_TYPES is not defined. This configuration variable is set correctly, as these overloads are not possible on this system. So we need another solution for storing or converting character types.

The constructor is in oct-inttypes.h:

It would be good if we could do this at the level of intNDArray<T>, but if not, we will have to do it by overloading the as_{u,}int{8,16,32,64} functions in octave_value and fixing any other locations where this constructor is called individually.

I set the OS field to Solaris/SunOS because that's where the bug was discovered, but this probably applies to any system where OCTAVE_HAVE_OVERLOAD_CHAR_INT8_TYPES is not defined. If you force that value on another system, you should see the same problem.

There is also one more place in oct-stream.cc where this configuration variable is used, but in that case, it should not change behavior.

John W. Eaton <jwe>
Project Administrator

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.3