bugGNU gettext - Bugs: bug #36179, reserved identifier violation

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #36179: reserved identifier violation

Submitted by:  Markus Elfring <elfring>
Submitted on:  Sat 14 Apr 2012 05:39:49 PM UTC  
 
Category: BuildSeverity: 1 - Wish
Item Group: NoneStatus: Not a Bug
Privacy: PublicAssigned to: Bruno Haible <haible>
Open/Closed: Closed

Sun 15 Apr 2012 01:50:59 PM UTC, comment #3:

What do you think about submitting a report about a real bug,
that is, one with observable negative consequences?

Bruno Haible <haible>
Project AdministratorIn charge of this item.
Sun 15 Apr 2012 12:42:35 PM UTC, comment #2:

Would you really like to continue with building your software on undefined behaviour?

Would it be better to make all identifiers standard-compliant?

How do you think about to improve the uniqueness for your include guards?

Markus Elfring <elfring>
Sat 14 Apr 2012 06:33:06 PM UTC, comment #1:

You are pointing to
https://www.securecoding.cert.org/confluence/display/seccode/DCL37-C.+Do+not+declare+or+define+a+reserved+identifier#DCL37-C.Donotdeclareordefineareservedidentifier-NoncompliantCodeExample(HeaderGuard)

While this site is generally a good recipe for junior C programmers
that teaches them how to use C without shooting themselves into
the foot, it is a bit exaggerated to expect 100% compliance with
its rules.

In particular, the area of reserved identifiers has always been
murky for the last 20 years. In practice:

  • identifiers starting with __ are clearly in the scope of the

implementation (libc and compiler),

  • identifiers starting with _ are a middle ground, sometimes

used by libc, sometimes used by third-party packages,
sometimes unused,

  • identifiers not starting with _ are also sometimes taken,

such as 'UNUSED' which cannot be defined as a macro on
MSVC systems.

So, in order to convince me to not use _DIR_LIST_H and similar,
you have to show that there is an actual conflict with some
package, not only a theoretical violation of some theoretic rule.

Bruno Haible <haible>
Project AdministratorIn charge of this item.
Sat 14 Apr 2012 05:39:49 PM UTC, original submission:

I would like to point out that identifiers like "_DIR_LIST_H" and "_OPEN_CATALOG_H" do not fit to the expected naming convention of the C language standard.
Would you like to adjust your selection for unique names?

Markus Elfring <elfring>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by haible (Posted a comment)
  • -unavailable- added by elfring (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 27 Nov 2016 01:27:12 AM UTChaibleCategoryNone=>Build
    Sat 14 Apr 2012 06:33:06 PM UTChaibleSeverity3 - Normal=>1 - Wish
      StatusNone=>Not a Bug
      Assigned toNone=>haible
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1