This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Machine attributes and language attributes


> I'd like to move to more uniformity with other attribute parsing, and have
> targets and front ends provide instead a table of accepted attributes.  
> This would contain function pointers for each attribute to handle that
> attribute, but would lose the ability to have infinitely many attributes
> for a target.  Does anyone see problems with such a change?

If you are saying that the target code provides a table of finite size,
that'd be OK with me, but you shouldn't code in any arbitrary
restriction.  That would not only potentially impede future work, it
would also be against the GNU coding standards:

Semantic Standards:

Avoid arbitrary limits on the length or number of *any* data structure,
including filenames, lines, files, and symbols, by allocating all
data structures dynamically.  In most Unix utilities, "long lines
are silently truncated".  This is not acceptable in a GNU utility.
(end quote)


In this case, you don't actually have to do dynamic allocation, you
can just have an array that is initialized by the target, and indicate
the size with a length counter or an end marker.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]