bugDenemo - Bugs: bug #37483, APPEND_DUR macro yields...

 
 

bug #37483: APPEND_DUR macro yields conditional operator with inconsistent types

Submitted by:  None
Submitted on:  Mon 01 Oct 2012 11:08:31 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sat 17 Nov 2012 09:12:03 AM UTC, comment #1:

I seem to have fixed this and forgotten to close the bug :(

Richard Shann <rshann>
Project Administrator
Mon 01 Oct 2012 11:08:31 PM UTC, original submission:

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 (mt@debian.org)

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rshann (Posted a comment)
  •  

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 17 Nov 2012 09:12:03 AM UTCrshannStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1