NO

Author Topic: Nested comment warning  (Read 4070 times)

czerny

  • Guest
Nested comment warning
« on: August 27, 2014, 02:23:16 PM »
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

  • Guest
Re: Nested comment warning
« Reply #1 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?

JohnF

  • Guest
Re: Nested comment warning
« Reply #2 on: August 30, 2014, 05:31:50 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

  • Guest
Re: Nested comment warning
« Reply #3 on: August 30, 2014, 06:17:02 PM »
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

  • Guest
Re: Nested comment warning
« Reply #4 on: August 31, 2014, 06:47:54 AM »
Sorry you are right, I had only commented out the pragma instead of removing it.

John

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: Nested comment warning
« Reply #5 on: September 01, 2014, 09:43:32 AM »
It is surely a scanner bug.
If you remove the #pragma and add an extra line feed here:
Code: [Select]
** 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
Code: [Select]
** undesirable behavior such as segfaults and heap corruption.
**
*/
SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt);
Or just a line feed
Code: [Select]
** undesirable behavior such as segfaults and heap corruption.

*/
SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt);

/*
Or adding a space at beginning of comment:
Code: [Select]
/*<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

  • Guest
Re: Nested comment warning
« Reply #6 on: September 01, 2014, 09:55:06 AM »
Ok! It would be nice if a moderator would move this in the bug section.