News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

Nested comment warning

Started by czerny, August 27, 2014, 02:23:16 PM

Previous topic - Next topic

czerny

In the past I have sometimes had the following warning:

warning #1066: Found '/*' inside comment

If I remember right, all these projects have been BIG projects and I was not able to break it down to a simple case. Now I have the same error and I would like to explore if this is a bug.

I have appended a project 'sqlitelib.ppj' (work in progress). Please look in 'sqlite3.h' line 3974

If you delete the #pragma you get warning #1066 and the following function declarations
'SQLITE_API int sqlite3_create_function()' etc. are not found anymore.

With the #pragma it seems ok!

czerny

Have I done some error? Or is this ok for a bug report? The projekt is not as small as I would like to have?

JohnF

Quote from: czerny on August 30, 2014, 05:09:03 PM
Have I done some error? Or is this ok for a bug report? The projekt is not as small as I would like to have?

I compiled you code but could not get that warning with or without the pragma.

John

czerny

Hmm! I have tried this on XP with Pelles C 8RC6 and on W2K with Pelles C 7RC4. Both with the same result.

sqlite3.h(3975): warning #1066: Found '/*' inside comment.

Can someone else confirm this warning?

JohnF

Sorry you are right, I had only commented out the pragma instead of removing it.

John

frankie

It is surely a scanner bug.
If you remove the #pragma and add an extra line feed here:

** undesirable behavior such as segfaults and heap corruption.
*/
SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt);
                                                                                                     <--------- Extra line feed

/*

The error disappear.
Disappear also adding a double ** in the comment

** undesirable behavior such as segfaults and heap corruption.
**
*/
SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt);

Or just a line feed

** undesirable behavior such as segfaults and heap corruption.

*/
SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt);

/*

Or adding a space at beginning of comment:

/*<space>
** CAPI3REF: Destroy A Prepared Statement Object

Or ....

It's a bug!  ;)
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

czerny

Ok! It would be nice if a moderator would move this in the bug section.