This is the mail archive of the
mailing list for the GCC project.
function attributes placement
- To: Gcc List <gcc at gcc dot gnu dot org>
- Subject: function attributes placement
- From: Didier Verna <didier at lrde dot epita dot fr>
- Date: Mon, 08 Oct 2001 17:20:48 +0200
I always organize my C files with static functions placed before any
functions that use them (when that's possible), hence I don't need to
prototype them first.
That's problematic whith function attributes like noreturn and const,
because they're supposed to appear in function declarations. I would tend to
think that my static functions are /declared/ at the same time they're
/defined/, but gcc doesn't think that way: if I put attributes in my static
functions (definitions), I get a parse error.
This is not a very kind neither informative message, and I would even
say that this could be considered as a bug. Comments ?
Didier Verna, firstname.lastname@example.org, http://www.lrde.epita.fr/~didier
EPITA / LRDE, 14-16 rue Voltaire Tel.+33 (1) 53 14 59 47
94276 Le Kremlin-BicÍtre, France Fax.+33 (1) 44 08 01 99 email@example.com