C++ comments in C unit mailnews/extensions/fts3/src/fts3_porter.c

RESOLVED WONTFIX

Status

--
minor
RESOLVED WONTFIX
9 years ago
9 years ago

People

(Reporter: ul-mcamafia, Assigned: ul-mcamafia)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

9 years ago
Replacing C++ comments with C comments fixes compilation for strict ANSI conformance.

xlc_r -o fts3_porter.o -c  -DMOZILLA_INTERNAL_API -DMOZ_SUITE=1 -DOSTYPE=\"AIX4.
3\" -DOSARCH=AIX  -I/home/ulink/src/comm-1.9.1/mailnews/extensions/fts3/src -I.
-I../../../../mozilla/dist/include/xpcom -I../../../../mozilla/dist/include/stri
ng -I../../../../mozilla/dist/include/sqlite3 -I../../../../mozilla/dist/include
/storage -I../../../../mozilla/dist/include   -I../../../../mozilla/dist/include
/fts3tok `/home/ulink/src/comm-1.9.1/obj-sm2-aix43/mozilla/dist/bin/nspr-config
--prefix=/home/ulink/src/comm-1.9.1/obj-sm2-aix43/mozilla/dist --includedir=/hom
e/ulink/src/comm-1.9.1/obj-sm2-aix43/mozilla/dist/include/nspr --cflags`      -q
flag=w:w     -DNDEBUG -DTRIMMED -O2 -qarch=604 -qmaxmem=-1 -qalias=noansi   -DMO
ZILLA_1_9_1_BRANCH=1 -DMOZILLA_VERSION=\"1.9.1.9pre\" -DMOZILLA_VERSION_U=1.9.1.
9pre -DAIX=1 -DHAVE_SYS_INTTYPES_H=1 -DNSCAP_DISABLE_DEBUG_PTR_TYPES=1 -DD_INO=d
_ino -DSTDC_HEADERS=1 -DHAVE_ST_BLKSIZE=1 -DHAVE_SIGINFO_T=1 -DHAVE_INT16_T=1 -D
HAVE_INT32_T=1 -DHAVE_INT64_T=1 -DHAVE_INT64=1 -DHAVE_UINT=1 -DHAVE_UINT_T=1 -DH
AVE_UINT16_T=1 -DHAVE_DIRENT_H=1 -DHAVE_MEMORY_H=1 -DHAVE_UNISTD_H=1 -DHAVE_NL_T
YPES_H=1 -DHAVE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ink/s
rc/comm-1.9.1/mailnews/extensions/fts3/src/fts3_porter.c
"/home/ulink/src/comm-1.9.1/mailnews/extensions/fts3/src/fts3_porter.c", line 74
0.5: 1506-046 (S) Syntax error.
"/home/ulink/src/comm-1.9.1/mailnews/extensions/fts3/src/fts3_porter.c", line 74
0.8: 1506-045 (S) Undeclared identifier This.
"/home/ulink/src/comm-1.9.1/mailnews/extensions/fts3/src/fts3_porter.c", line 75
0.7: 1506-046 (S) Syntax error.
"/home/ulink/src/comm-1.9.1/mailnews/extensions/fts3/src/fts3_porter.c", line 75
0.10: 1506-058 (S) Label cases has already been defined on line 744 of "/home/ul
ink/src/comm-1.9.1/mailnews/extensions/fts3/src/fts3_porter.c".
"/home/ulink/src/comm-1.9.1/mailnews/extensions/fts3/src/fts3_porter.c", line 75
2.7: 1506-068 (S) Operation between types "char*" and "int*" is not allowed.
"/home/ulink/src/comm-1.9.1/mailnews/extensions/fts3/src/fts3_porter.c", line 75
2.14: 1506-277 (S) Syntax error: possible missing ';' or ','?
"/home/ulink/src/comm-1.9.1/mailnews/extensions/fts3/src/fts3_porter.c", line 75
4.10: 1506-058 (S) Label cases has already been defined on line 744 of "/home/ul
ink/src/comm-1.9.1/mailnews/extensions/fts3/src/fts3_porter.c".
"/home/ulink/src/comm-1.9.1/mailnews/extensions/fts3/src/fts3_porter.c", line 75
5.7: 1506-068 (S) Operation between types "char*" and "int*" is not allowed.
"/home/ulink/src/comm-1.9.1/mailnews/extensions/fts3/src/fts3_porter.c", line 75
5.14: 1506-277 (S) Syntax error: possible missing ';' or ','?
"/home/ulink/src/comm-1.9.1/mailnews/extensions/fts3/src/fts3_porter.c", line 76
0.3: 1506-046 (S) Syntax error.
"/home/ulink/src/comm-1.9.1/mailnews/extensions/fts3/src/fts3_porter.c", line 76
0.6: 1506-045 (S) Undeclared identifier at.
"/home/ulink/src/comm-1.9.1/mailnews/extensions/fts3/src/fts3_porter.c", line 76
8.3: 1506-046 (S) Syntax error.
"/home/ulink/src/comm-1.9.1/mailnews/extensions/fts3/src/fts3_porter.c", line 77
0.15: 1506-260 (S) Octal integer constant 0a4cf is not valid.
"/home/ulink/src/comm-1.9.1/mailnews/extensions/fts3/src/fts3_porter.c", line 76
8.6: 1506-045 (S) Undeclared identifier Anything.
"/home/ulink/src/comm-1.9.1/mailnews/extensions/fts3/src/fts3_porter.c", line 77
1.80: 1506-209 (S) Character constants must end before the end of a line.
"/home/ulink/src/comm-1.9.1/mailnews/extensions/fts3/src/fts3_porter.c", line 77
1.66: 1506-076 (W) Character constant 're leaving it' has more than one characte
r. No more than rightmost 4 characters are used.
"/home/ulink/src/comm-1.9.1/mailnews/extensions/fts3/src/fts3_porter.c", line 77
3.8: 1506-045 (S) Undeclared identifier We.
"/home/ulink/src/comm-1.9.1/mailnews/extensions/fts3/src/fts3_porter.c", line 77
4.6: 1506-058 (S) Label cases has already been defined on line 744 of "/home/uli
nk/src/comm-1.9.1/mailnews/extensions/fts3/src/fts3_porter.c".
"/home/ulink/src/comm-1.9.1/mailnews/extensions/fts3/src/fts3_porter.c", line 91
7.38: 1506-076 (W) Character constant 't be a delimiter because in a ' has more
than one character. No more than rightmost 4 characters are used.
"/home/ulink/src/comm-1.9.1/mailnews/extensions/fts3/src/fts3_porter.c", line 91
7.78: 1506-209 (S) Character constants must end before the end of a line.
"/home/ulink/src/comm-1.9.1/mailnews/extensions/fts3/src/fts3_porter.c", line 91
7.77: 1506-073 (E) Empty character constant.
"/home/ulink/src/comm-1.9.1/mailnews/extensions/fts3/src/fts3_porter.c", line 93
0.79: 1506-209 (S) Character constants must end before the end of a line.
"/home/ulink/src/comm-1.9.1/mailnews/extensions/fts3/src/fts3_porter.c", line 93
0.20: 1506-076 (W) Character constant 't terminate.  However, if we terminate, l
en still contains' has more than one character. No more than rightmost 4 charact
ers are used.
gmake[6]: *** [fts3_porter.o] Error 1
(Assignee)

Comment 1

9 years ago
Created attachment 428686 [details] [diff] [review]
Replacing C++ comments with C comments for ANSI conformance
Assignee: nobody → ul.mcamafia
Status: NEW → ASSIGNED
(Assignee)

Updated

9 years ago
Attachment #428686 - Flags: review?(djripper)
Component: Search → Database
QA Contact: search → database
Comment on attachment 428686 [details] [diff] [review]
Replacing C++ comments with C comments for ANSI conformance

I'd rather we just change the file to be C++.  Since none of the supported platform builders get angry about C++ comments, it's likely a better long-term strategy.  We do, of course, need to make sure to mark the functions exposed to SQLite as extern "C".

Please direct any reviews to me for this code.
Attachment #428686 - Flags: review?(djripper) → review-
(Assignee)

Comment 3

9 years ago
(In reply to comment #2)
> (From update of attachment 428686 [details] [diff] [review])

> Since none of the supported
> platform builders get angry about C++ comments, 

both GCC and MSVC accept this non ANSI conformant C code, even with --pedantic
I can add "-qcpluscmt" in CPPFLAGS in Makefile.in or compile in C99 mode.
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.