I wanted to issue an error (for pic16) when a function marked as ISR has any params.
Due to absence of an "interrupt" function attribute, pic16 uses section attribute to encode this information.
Otherwise, it is a pretty generic functionality valid for every target and can be implemented in a generic way.
I am looking for ideas on how to solve this:
A. by adding an "interrupt" attribute ?
B. by having a hook in TargetInfo ? This is a little out of the way as the hook will need to access Function Attrs.
C. Any other ideas?
I wanted to issue an error (for pic16) when a function marked as ISR has
Once we talked with Chris a bit about semantic checks of
target-specific attributes. For example, currently all stuff for
windows-specific dll* are made in the generic code which is not good.
Same applies here, for example, some targets might want to do
different things with ISRs.
It turned out that proper way of doing such stuff is some 'attribute
registering' mechanism - when you can inform the frontend about new
attribute and provide special functions to do semantic checks and
codegening for this attribute. This would allow easy add of new
target-specific attribute without putting the code into generic