[CDRIVER-820] error: #pragma GCC diagnostic not allowed inside functions Created: 31/Aug/15  Updated: 19/Oct/16  Resolved: 31/Aug/15

Status: Closed
Project: C Driver
Component/s: libmongoc
Affects Version/s: 1.2-beta0
Fix Version/s: 1.2-beta1

Type: Bug Priority: Major - P3
Reporter: Remi Collet Assignee: Hannes Magnusson
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

RHEL-6



 Description   

Build ok with gcc 4.8, 4.9 and 5.1

Build fails with gcc 4.4 (default compiler on RHEL/CentOS 6)

src/mongoc/mongoc-matcher-op.c: In function '_mongoc_matcher_op_compare_new':
src/mongoc/mongoc-matcher-op.c:166: error: #pragma GCC diagnostic not allowed inside functions
src/mongoc/mongoc-matcher-op.c:167: error: #pragma GCC diagnostic not allowed inside functions
src/mongoc/mongoc-matcher-op.c:172: error: #pragma GCC diagnostic not allowed inside functions



 Comments   
Comment by Remi Collet [ 31/Aug/15 ]

Thanks.
I confirm this fix is ok.

Comment by Githook User [ 31/Aug/15 ]

Author:

{u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}

Message: CDRIVER-820: error: #pragma GCC diagnostic not allowed inside functions

And remove the unhelpful (debug) assert that cause two tickets so far
Branch: 1.2.0-dev
https://github.com/mongodb/mongo-c-driver/commit/d5de834e40e157b34a6a384c5856917eb1b56cdc

Generated at Wed Feb 07 21:10:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.