Again please no // comments !!!!!!!!

Поиск
Список
Период
Сортировка
Искать

Again please no // comments !!!!!!!!

От:
Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>
Дата:
This somehow gets moot. Is there a way to make gcc reject those comments ?

Andreas

*** ./src/backend/utils/adt/varbit.c.orig	Wed Nov  1 10:00:22 2000
--- ./src/backend/utils/adt/varbit.c	Tue Nov  7 11:07:28 2000
***************
*** 1212,1218 **** 				is_match = ((cmp ^ *p) & mask1) == 0; 				if (!is_match) 					break;
! 				// Move on to the next byte 				p++; 				if (p == VARBITEND(arg)) { 					mask2 = end_mask << (BITS_PER_BYTE - is);
--- 1212,1218 ---- 				is_match = ((cmp ^ *p) & mask1) == 0; 				if (!is_match) 					break;
! 				/* Move on to the next byte */ 				p++; 				if (p == VARBITEND(arg)) { 					mask2 = end_mask << (BITS_PER_BYTE - is);



Re: Again please no // comments !!!!!!!!

От:
Bruce Momjian <pgman@candle.pha.pa.us>
Дата:
Applied.


[ Charset ISO-8859-1 unsupported, converting... ]
> This somehow gets moot. Is there a way to make gcc reject those comments ?
> 
> Andreas
> 
> *** ./src/backend/utils/adt/varbit.c.orig	Wed Nov  1 10:00:22 2000
> --- ./src/backend/utils/adt/varbit.c	Tue Nov  7 11:07:28 2000
> ***************
> *** 1212,1218 ****
>   				is_match = ((cmp ^ *p) & mask1) == 0;
>   				if (!is_match)
>   					break;
> ! 				// Move on to the next byte
>   				p++;
>   				if (p == VARBITEND(arg)) {
>   					mask2 = end_mask << (BITS_PER_BYTE - is);
> --- 1212,1218 ----
>   				is_match = ((cmp ^ *p) & mask1) == 0;
>   				if (!is_match)
>   					break;
> ! 				/* Move on to the next byte */
>   				p++;
>   				if (p == VARBITEND(arg)) {
>   					mask2 = end_mask << (BITS_PER_BYTE - is);
> 
> 
> 


--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610) 853-3000 +  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Re: Again please no // comments !!!!!!!!

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Zeugswetter Andreas SB  writes:
> This somehow gets moot. Is there a way to make gcc reject those comments ?

It looks like -ansi would cause gcc to reject // comments, but -ansi has
enough not-so-desirable side effects that I would vote against making
that switch part of our standard switch set for gcc.

I think we should continue to rely on our faithful community of testers
to find portability glitches like this one ;-)
		regards, tom lane

FAQ