[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #64977] Explore options for the bytecode inter
From: |
Petter |
Subject: |
[Octave-bug-tracker] [bug #64977] Explore options for the bytecode interpreter in Octave 9 |
Date: |
Mon, 4 Dec 2023 17:49:57 -0500 (EST) |
Follow-up Comment #4, bug #64977 (project octave):
The incompatibility risk I am aware of is the computed goto:s in execute_code
() in pt-bytecode-vm.cc. I believe if compilation issues are the concern, #if
guards for the whole body of execute_code () should make compilers without
that GNU extension happy and if-guards around user facing functions that makes
no sense without being able to run the bytecode interpreter.
The bytecode interpreter is tested on 32-bit systems without problem, and
there is code to support big endian systems, but I have had no way to try that
on an actual big endian system.
I compiled with CXXFLAGS="-pedantic -std=c++17" and the complaints were:
./../libinterp/parse-tree/oct-parse.yy:417:53: warning: ISO C++11 requires at
least one argument for the "..." in a variadic macro
417 | OCTAVE_YYUSE ($2);
./../liboctave/system/file-ops.cc: In function 'std::string
octave::sys::tempnam(const std::string&, const std::string&, std::string&)':
./../liboctave/system/file-ops.cc:752:8: warning: ISO C++ forbids variable
length array 'tname' [-Wvla]
752 | char tname [templatename.length () + 1];
| ^~~~~
./../liboctave/util/oct-string.cc: In member function 'virtual int
octave::string::codecvt_u8::do_length(StateT&, const ExternT*, const ExternT*,
std::size_t) const':
./../liboctave/util/oct-string.cc:894:15: warning: ISO C++ forbids variable
length array 'offsets' [-Wvla]
894 | std::size_t offsets[srclen];
| ^~~~~~~
'pedantic' didn't trigger on the computed goto:s, so it does not seem to warn
on every GNU extension.
However I did find some function attributes I've missed guarding. I would
suggest something like the attached patch for those:
(file #55404)
_______________________________________________________
Additional Item Attachment:
File name: 32841.patch Size:2 KB
<https://file.savannah.gnu.org/file/32841.patch?file_id=55404>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?64977>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #64977] Explore options for the bytecode interpreter in Octave 9, Markus Mützel, 2023/12/04
- [Octave-bug-tracker] [bug #64977] Explore options for the bytecode interpreter in Octave 9, Arun Giridhar, 2023/12/04
- [Octave-bug-tracker] [bug #64977] Explore options for the bytecode interpreter in Octave 9, Markus Mützel, 2023/12/04
- [Octave-bug-tracker] [bug #64977] Explore options for the bytecode interpreter in Octave 9, John W. Eaton, 2023/12/04
- [Octave-bug-tracker] [bug #64977] Explore options for the bytecode interpreter in Octave 9,
Petter <=
- [Octave-bug-tracker] [bug #64977] Explore options for the bytecode interpreter in Octave 9, John W. Eaton, 2023/12/07
- [Octave-bug-tracker] [bug #64977] Explore options for the bytecode interpreter in Octave 9, John W. Eaton, 2023/12/07
- [Octave-bug-tracker] [bug #64977] Explore options for the bytecode interpreter in Octave 9, anonymous, 2023/12/07
- Message not available
- [Octave-bug-tracker] [bug #64977] Explore options for the bytecode interpreter in Octave 9, Nicholas Jankowski, 2023/12/07
- [Octave-bug-tracker] [bug #64977] Explore options for the bytecode interpreter in Octave 9, Markus Mützel, 2023/12/08
- [Octave-bug-tracker] [bug #64977] Explore options for the bytecode interpreter in Octave 9, Hendrik K, 2023/12/08
- [Octave-bug-tracker] [bug #64977] Explore options for the bytecode interpreter in Octave 9, Doug Stewart, 2023/12/08
- [Octave-bug-tracker] [bug #64977] Explore options for the bytecode interpreter in Octave 9, Nicholas Jankowski, 2023/12/08
- [Octave-bug-tracker] [bug #64977] Explore options for the bytecode interpreter in Octave 9, John W. Eaton, 2023/12/08
- [Octave-bug-tracker] [bug #64977] Explore options for the bytecode interpreter in Octave 9, John W. Eaton, 2023/12/08