Re: Warning on useless 'const' in a function declaration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 7 Oct 2024 at 15:28, R. Diez via Gcc-help <gcc-help@xxxxxxxxxxx>
wrote:

> Hi all:
>
> Sometimes, I forget to remove useless 'const' modifiers in function
> declarations. A simplified example is:
>
> file.h:
>
> int f ( const int a );  // 'const' is useless here.
>
>
> file.cpp:
>
> int f ( const int a )
> {
>    return a;
> }
>
>
> Is there a way to make GCC issue warnings about those useless 'const'
> modifiers?
>

No, sorry.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux