Skip to contentSkip to conversation

I request inclusion of reiser4 in the mainline kernel

DISCUSSION James Lamanna 2 participants 3 messages Sep 20, 2005

lore
Share & tools
lore
#0 lore raw
Quoted 11 lines · Stephen Pollei
Quoted 9 lines · Hans Reiser
Quoted 2 lines · Horst von Brand

Nikita Danilov <[email protected]> wrote:
It is supposed to go into the kernel, which is not exactly warning-free.

Is that what this thread boils down to, that you guys think the compile should fail not warn?

I don't care if it fails or warns at compile time, but you shouldn't misuse/abuse a warning by potentialily introducing an unrelated bug.

Quoted 12 lines

So if you had
#if defined(DEBUG_THIS) || defined(DEBUG_THAT)
int znode_is_loaded(const struct znode *z);
#else
int znode_is_loaded(const struct znode *z)
__attribute__((__warn_broken__("unavailible when not debuging")));
#endif
That would be great with me.. except __warn_broken__ or the like doesn't exist AFAIK :-<
Closest thing is __attribute((__deprecated__)) but thats not quite right.

Quoted 2 lines
Quoted 2 lines

As was said before: It it is /really/ wrong, arrange for it not to compile or not to link. If it isn't, well... then it wasn't that wrong anyway.

What about #warning / #error in this case?

#if defined(DEBUG_THIS) || defined(DEBUG_THAT)
    int znode_is_loaded(const struct znode *z);

#else
#error znode_is_loaded is unavailable when not debugging
#endif

That would certainly break the compile.

-- James Lamanna

#1 lore raw
Quoted 27 lines · James Lamanna
Quoted 11 lines · Stephen Pollei
Quoted 9 lines · Hans Reiser
Quoted 2 lines · Horst von Brand

Nikita Danilov <[email protected]> wrote:
It is supposed to go into the kernel, which is not exactly warning-free.

Is that what this thread boils down to, that you guys think the compile should fail not warn?

I don't care if it fails or warns at compile time, but you shouldn't misuse/abuse a warning by potentialily introducing an unrelated bug.

Quoted 12 lines

So if you had
#if defined(DEBUG_THIS) || defined(DEBUG_THAT)
int znode_is_loaded(const struct znode *z);
#else
int znode_is_loaded(const struct znode *z)
__attribute__((__warn_broken__("unavailible when not debuging")));
#endif
That would be great with me.. except __warn_broken__ or the like doesn't exist AFAIK :-<
Closest thing is __attribute((__deprecated__)) but thats not quite right.

Quoted 2 lines
Quoted 2 lines

As was said before: It it is /really/ wrong, arrange for it not to compile or not to link. If it isn't, well... then it wasn't that wrong anyway.

What about #warning / #error in this case?

Quoted 7 lines
#if defined(DEBUG_THIS) || defined(DEBUG_THAT)
    int znode_is_loaded(const struct znode *z);

#else
#error znode_is_loaded is unavailable when not debugging
#endif

That would certainly break the compile.

Except that breaks the compile unconditionally, not just when someone tries to use the function when they shouldn't. I don't think a flat error will work here, but instead something along the lines of a __attribute__((error)) on the function is needed.

Quoted 2 lines

-- James Lamanna
-

-VadimL

#2 lore raw
Quoted 15 lines · Vadim Lobanov
Quoted 13 lines · James Lamanna
Quoted 3 lines · Stephen Pollei
Quoted 2 lines · Hans Reiser
Quoted 1 line · Horst von Brand

Nikita Danilov <[email protected]> wrote:

What about #warning / #error in this case?

#if defined(DEBUG_THIS) || defined(DEBUG_THAT)
    int znode_is_loaded(const struct znode *z);

#else
#error znode_is_loaded is unavailable when not debugging
#endif

Quoted 6 lines
Quoted 1 line

That would certainly break the compile.

Except that breaks the compile unconditionally, not just when someone tries to use the function when they shouldn't. I don't think a flat error will work here, but instead something along the lines of a __attribute__((error)) on the function is needed.

Oh duh. It would wouldn't it :)
Too much on my mind today.

Quoted 6 lines
Quoted 3 lines

-- James Lamanna
-

-VadimL

-- James Lamanna