Opened 13 years ago

Closed 11 years ago

#34331 closed defect (fixed)

libgda3 build fails with clang

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: jyrkiwahlstedt
Priority: Normal Milestone:
Component: ports Version: 2.0.4
Keywords: clang Cc: dbevans (David B. Evans)
Port: libgda3

Description

http://build.macports.org/builders/buildports-lion-x86_64/builds/548/steps/compile/logs/stdio

gda-entity-field.c:112:2: error: void function 'gda_entity_field_set_dict_type' should not return a value [-Wreturn-type]

The software should be patched to work with clang...

Change History (10)

comment:1 Changed 12 years ago by dbevans (David B. Evans)

fix committed in r105103

comment:2 Changed 12 years ago by dbevans (David B. Evans)

Resolution: fixed
Status: newclosed

comment:3 Changed 12 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: closedreopened

Telling the compiler to ignore the problem is not a real fix. The code needs to be fixed so the function prototype and the actual behaviour match.

comment:4 in reply to:  3 Changed 12 years ago by cooljeanius (Eric Gallager)

Replying to jmr@…:

The code needs to be fixed so the function prototype and the actual behaviour match.

That's something upstream should do

comment:5 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

I agree that would be ideal, however libgda 3.0.4 was released five years ago, and has been surpassed by versions 4 and 5, so I doubt upstream will be making any further changes to version 3.

comment:6 Changed 12 years ago by jmroot (Joshua Root)

Regardless of whose job it is to fix it, letting invalid code through is absolutely not something you want to do. What even happens when a void function returns a value? It's completely undefined. The top of the stack could be clobbered by the unexpected value, the program could crash, or anything at all could happen really.

comment:7 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: devans@… added

Well, presumably nothing catastrophically bad happens, since all users of this program on all platforms have been using this bad code. And I guess gcc merely issued a warning for this and allowed compilation to proceed. So changing the flags to let clang do the same might not be so terrible. Sure, if someone can figure out what the developers meant to do, and fix the code to actually do that, then that would be better.

comment:8 Changed 12 years ago by jmroot (Joshua Root)

Maybe nothing bad happened with gcc (or did it? How do you know the data being processed didn't come out subtly wrong?), but given that the compiler is within its rights to do literally anything when it encounters code with undefined behaviour, the same is not guaranteed to be true with clang.

comment:9 Changed 12 years ago by dbevans (David B. Evans)

Well putting in my two cents, I don't think its worth spending much time on this port.

This version of libgda is way out of date and there are no dependents. Newer versions are in libgda4 (gtk2 compatible) and libgda5 (gtk3 compatible).

I vote to nuke the port rather than mess with it.

comment:10 Changed 11 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Resolution: fixed
Status: reopenedclosed

Done. r109448

Note: See TracTickets for help on using tickets.