octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #55046] Add static compile-time checking of pr


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #55046] Add static compile-time checking of printf functions using compiler attributes
Date: Thu, 29 Nov 2018 16:49:47 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0

Follow-up Comment #23, bug #55046 (project octave):

For the octave_idx_type we could maybe static_cast to "int64_t" and use '"%"
PRId64' as format identifier. See e.g. [1].

Alternatively, "long long int" and "%lld" should be large enough on all
platforms.

Is there any penalty for using static_cast? (Apart from the code becoming more
cluttered.)

[1]: https://en.cppreference.com/w/cpp/types/integer

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?55046>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]