For very good reasons GCC tries not to support #pragma.
> The new code would be:
>
> if (minix_set_bit(j,bh->b_data)) {
> #pragma rarely_used
> printk("new_inode: bit already set");
> iput(inode);
> return NULL;
> }
>
> gcc currently generates
>
> if not condition goto behind_if
> [code for the if clause]
> behind_if:
>
> which in case of the pragma should become
>
> if condition goto behind_everything_else
> [rest of function]
> ret
> behind_everything_else:
> [code for the if clause]
>
> I'd hope that this isn't too hard to implement.... :-)
Actually your answer already contains the solution to the problem:
Put the code for the common case into if. What GCC really lacks to
handle cases like this better is generating multiple copies of the
epilog code. Not to bad either because that makes code with a
small cache footprint.
Ralf