public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* function attributes placement
@ 2001-10-08  8:17 Didier Verna
  0 siblings, 0 replies; only message in thread
From: Didier Verna @ 2001-10-08  8:17 UTC (permalink / raw)
  To: Gcc List

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 889 bytes --]

               Hi !

        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, didier@lrde.epita.fr, 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   didier@xemacs.org

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-10-08  8:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-08  8:17 function attributes placement Didier Verna

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).