Project

General

Profile

Bug #54

Compile fixes: enums aren't ints, and typename is now a reserved word

Added by Tom Joseph over 13 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
High
Assignee:
Erik Lindahl
Category:
mdrun
Target version:
Affected version - extra info:
Affected version:
Difficulty:
uncategorized
Close

Description

Had problems compiling on a Mac OS X 10.3 machine because:

- In gmxlib/nonbonded/nb_kernel/mknb.c, around line 300: the ++ operator isn't
appropriate because enums aren't ints. You used to be able to get by treating
them as such, but not universally anymore.

- In gmxlib/nonbonded/nb_kernel/mknb_metacode.[ch]: "typename" is now a reserved
word in C++. I realize this is technically a C file, but why not just use
"type_name" instead?

Once I figure out how to upload a patch, I will upload mine that fixes these issues.

gromacs-3.3-compile-fixes.patch (5.15 KB) gromacs-3.3-compile-fixes.patch Fixes the problems I describe. My fix for the enum issue isn't actually a terrific one as it uses a cast, but at least it shuts gcc up. Tom Joseph, 03/05/2006 07:34 AM

History

#1 Updated by Tom Joseph over 13 years ago

Created an attachment (id=24)
Fixes the problems I describe

#2 Updated by Erik Lindahl over 13 years ago

Fixed. It took a while extra since the proposed solution is only valid in C++. For C the cast now looks like
mknb_func.vdw = (enum mknb_vdw)(mknb_func.vdw + 1)), which is a bit ugly, but we'll think of beauty
later.

Also available in: Atom PDF