Re: any value to "NORET_TYPE" macro?



On 5/22/07, Robert P. J. Day <rpjday@xxxxxxxxxxxxxx> wrote:
On Tue, 22 May 2007, John Anthony Kazos Jr. wrote:

> > given that:
> >
> > $ grep -r "define.*NORET_TYPE" *
> > include/linux/ext4_fs.h:# define NORET_TYPE /**/
> > include/linux/linkage.h:#define NORET_TYPE /**/
> > include/linux/ext3_fs.h:# define NORET_TYPE /**/
> > $
> >
> > is there any obvious value to the 30 or so uses of that macro
> > sprinkled throughout the tree?
>
> Since it evaluates to absolutely empty code during pre-processing,
> there is no obvious value. The question is whether there is some odd
> hackish non-obvious value, I'd expect. (I'd also expect that to be
> another "no".)
>
> If something that evaluates to nothingness ("There was nothing
> left...not even a hole!") actually does anything, then somebody in
> the standards-compilers-users pipeline needs to be violently beaten
> for stupidity.


actually, one of the folks on the KJ list found this:

http://www.ussg.iu.edu/hypermail/linux/kernel/9605/1957.html

which speaks thusly:

...
-#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
-# define NORET_TYPE __volatile__
-# define ATTRIB_NORET /**/
-# define NORET_AND /**/
-#else
# define NORET_TYPE /**/
# define ATTRIB_NORET __attribute__((noreturn))
# define NORET_AND noreturn,
-#endif
...

so it looks like a thoroughly obsolete macro which can be tossed.
i'll make the patch and test it.

AFAICT, NORET_TYPE must've been introduced to silence gcc _warnings_,
and not do actually do anything useful that affects functionality in any way.
So the way to "test" your patch would be to see if there is any increase /
decrease in the number of *warnings* blurted out by gcc during kernel build
(best would be to build with various gcc versions on various platforms :-)

Satyam
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: Inertial-dampening systems
    ... take that wire, disconnect it from the ... >> resistor, and a second channel on the scope across that ... the lead of your scope coming off the far side of the ... >> determined by the current versus time in the magnet. ...
    (sci.physics)
  • Re: [PATCH -v7][RFC]: mutex: implement adaptive spinning
    ... I just ran a sample build for x86-64 with gcc 4.3.0, ... As shown by the delta from Andi's patch, ... inline a higher level of inline functions for the same bogus reason. ... weight of the asm statement... ...
    (Linux-Kernel)
  • Re: [CFT] updated gcc-3.4.0 fixes patch for 2.4.27-pre1
    ... I propose fixing problems that will appear with gcc 3.5, ... Here is a patch for the few places I got hit at. ... pci_set_drvdata(pci_dev, dev); ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: [PATCH 2/7] ipc: fix trivial warning
    ... Ergo gcc developers should rather fix this "regression" and revert ... Because I want to get rid of the warning? ... if you look at the commit I mentioned in the commit message ... In any case, if the patch is not correct, then somebody should point ...
    (Linux-Kernel)
  • Re: ProPolice and pthreads (was: ProPolice and FreeBSD)
    ... > initially used the patch against FreeBSD 5.1 to know which file I ... > newest patch against gcc 3.4.1 for gcc specific stuffs. ... > GDB is free software, covered by the GNU General Public License, and you are ...
    (freebsd-hackers)

Loading