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]
Other format: [Raw text]

Re: [PATCH] fix warning about duplicate 'const'


Richard Henderson writes:
 > On Wed, Mar 10, 2004 at 07:43:10AM -0800, Linus Torvalds wrote:
 > > Ok, let's try just stripping the "const" out of the min/max macros, and
 > > see what complains.
 > 
 > I remember what complains.  You get actual errors from
 > 
 > 	const int x; 
 > 	int y;
 > 	min(x, y);

Can you explain *why* we have to produce a diagnostic for "const const
int" by default?

Can't we dispatch such things to "-pedantic" ?  Or treat "const const"
like "long long" used to be, a gcc extension?

Andrew.


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