From: Borja F. <bor...@gm...> - 2012-03-06 19:22:08
|
It issues a warning, so, it doesn't apply the attribute and it doesn't abort compilation. I checked gcc and it warns aswell. However i can error out if it's better, i leave that up to you. 2012/3/6 Weddington, Eric <Eri...@at...> > > > > -----Original Message----- > > From: Borja Ferrer [mailto:bor...@gm...] > > Sent: Tuesday, March 06, 2012 11:57 AM > > To: Weddington, Eric > > Cc: avr...@li... > > Subject: Re: [avr-llvm-devel] Interrupt handling > > > > I've added some checks to the frontend when setting the > signal/interrupt > > attribute that are the following: > > > > 1) warn when the attrib is used in things that aren't function > declarations. > > 2) warn when the function has arguments > > 3) warn when the function doesnt return a void > > > > If anybody can think of any more checks that are required let me know. > > > > Oh, and here are the warning messages printed for cases 2 and 3 > respectively, > > again, if somebody has a better descriptive string or with better > english I'll > > change it: > > > > 2) "'%0' attribute only applies to functions with no arguments" > > 3) "'%0' attribute only applies to functions with a void return type" > > where %0 is either interrupt or signal > > > > Semantics question: Do you mean that it issues just a *warning*? Or does > it error out on these? > |