[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re-positioning compiler attributes
From: |
Rik |
Subject: |
Re-positioning compiler attributes |
Date: |
Sun, 3 Jan 2016 11:24:22 -0800 |
1/3/16
All,
I've done a trial changeset to start moving compiler attributes to the
start of declarations. This will eventually allow us to use standardized
C++ compiler attributes rather than compiler-specific ones like
__attribute__ for gcc or __declspec for MSVC. The results are here
http://hg.savannah.gnu.org/hgweb/octave/rev/e3b3bb522d62.
There was no particular coding standard that looked best. When possible,
particularly in header files with only declarations, I tried to get
everything on one line. If that didn't work, I put all the qualifiers on
one line and the return type and function name on the next line. In .cc
files I tried a 3-line style with attributes on the first line, return type
on the next line, and the function name and arguments on the third.
--Rik