Project

General

Profile

Actions

Bug #12213

closed

Lots of warnings: operation on ‘precision’ may be undefined

Added by duerst (Martin Dürst) about 8 years ago. Updated about 8 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.4.0dev (2016-03-24 trunk 54246) [x86_64-cygwin]
[ruby-core:74532]

Description

When compiling ruby trunk on cygwin, I get a long list of warnings starting with the following:

strftime.c:290:14: warning: operation on ‘precision’ may be undefined [-Wsequence-poin t]
precision = FMT_PRECISION(def_prec);
^
strftime.c:411:4: note: in expansion of macro ‘FMT’
FMT('0', 2, "d", (int)i);
^

The other line numbers are: 425, 430, 435, 440, 462, 464, 323, and so on. Besides line 290, which turns up a lot, line 327 is also mentioned a few times, as well as the macro 'FMTV' (rather than 'FMT').

Actions #1

Updated by nobu (Nobuyoshi Nakada) about 8 years ago

  • Status changed from Open to Closed

Applied in changeset r54248.


strftime.c: remove recursive-assignments

  • strftime.c (FMT, FMTV): remove recursive-assignments to get rid
    of undefined behavior. [ruby-core:74532] [Bug #12213]

Updated by usa (Usaku NAKAMURA) about 8 years ago

  • Backport changed from 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN to 2.1: DONTNEED, 2.2: DONTNEED, 2.3: DONTNEED
Actions

Also available in: Atom PDF

Like0
Like0Like0