denemo-devel
[Top][All Lists]
Advanced

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

[Denemo-devel] [bug #37483] APPEND_DUR macro yields conditional operator


From: anonymous
Subject: [Denemo-devel] [bug #37483] APPEND_DUR macro yields conditional operator with inconsistent types
Date: Mon, 01 Oct 2012 23:08:32 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:15.0) Gecko/20100101 Firefox/15.0.1

URL:
  <http://savannah.gnu.org/bugs/?37483>

                 Summary: APPEND_DUR macro yields conditional operator with
inconsistent types
                 Project: Denemo
            Submitted by: None
            Submitted on: Mon 01 Oct 2012 11:08:31 PM UTC
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Hi,

While building your package using our research compiler infrastructure we
noticed that the condition operator resulting from expansion of APPEND_DUR of
src/exportlilypond.c does not typecheck:

The return type of g_string_append is GString*, but append_duration has return
type void. Yet the C standard requires that the second and third argument of
the conditional operator ?: are compatible pointer types (there are several
other cases, see 6.5.15 of the C Standard). Failing this, the compiler may
produce arbitrary code.

The best way to fix this is likely making append_duration return a GString*,
which is easily implemented by a simple return figure;

Best,
Michael (address@hidden)




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?37483>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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