bugGNU Scientific Library - Bugs: bug #36197, reserved identifier violation

 
 

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

bug #36197: reserved identifier violation

Submitted by:  Markus Elfring <elfring>
Submitted on:  Sun 15 Apr 2012 04:11:38 PM UTC  
 
Category: BuildSeverity: 3 - Normal
Operating System: Status: None
Assigned to: NoneOpen/Closed: Open
Release: 

Sun 03 Jun 2012 09:14:39 AM UTC, comment #5:

Appending a UUID would definitely reduce the probability of name clashes. However, we don't seem to have a name clash problem given that there are no outstanding bugs from name clashes and GSL is more than 16 years old.

Rhys Ulerich <rhysu>
Project Administrator
Sun 03 Jun 2012 08:44:48 AM UTC, comment #4:

How do you think about to append a kind of UUID to your include guards so that the probability for name clashes can be reduced a bit more?

Markus Elfring <elfring>
Sun 03 Jun 2012 01:19:50 AM UTC, comment #3:

Thanks for the clarification.

So, the double include #defines can be fixed. Changing the long-standing public APIs isn't an option as it would break existing users. Unfortunately it's an old set of decisions that are irreversible at this time.

Unless you object, I'd like to consider "fixing" this bug to be simply changing "__GSL" to "GSL" in the double inclusion guards.

Rhys Ulerich <rhysu>
Project Administrator
Sat 02 Jun 2012 09:10:29 PM UTC, comment #2:

I suggest to be more careful with the use of double underscores for identifiers in your source files.

Would you also like to clarify the interpretation of the word "and" in the referenced paragraph?

Markus Elfring <elfring>
Sat 02 Jun 2012 05:35:19 PM UTC, comment #1:

I agree that "__GSL_MATH_H_" is problematic according to the link you sent. That fix is just a judicious 'perl -pi -e' invocation across the code base and should be doable.

At a glance, I'm uncertain why "gsl_mode_t" and "gsl_prec_t" tamper with the POSIX name space. I see the "ANY header" table entry in the specification you linked. It seems the clause "End in the string indicated as a reserved suffix in the table and do not use the reserved prefixes posix_, POSIX_, or POSIX, as long as the reserved suffix is in that part of the name considered significant by the implementation." may prevent "gsl_mode_t" from being problematic, e.g., because it does not have a posix-y prefix.

Regardless, changing the GSL types ending with a "_t" would break the existing public APIs. I don't think this part of your report is fixable.

Rhys Ulerich <rhysu>
Project Administrator
Sun 15 Apr 2012 04:11:38 PM UTC, original submission:

I would like to point out that an identifier like "_GSL_MATH_H_" does not fit to the expected naming convention of the C++ language standard.

Identifiers like "gsl_mode_t" and "gsl_prec_t" tamper with the POSIX name space.

Would you like to adjust your selection for unique names?

Markus Elfring <elfring>

 

Attached Files
file #27727:  36197a.diff added by elfring (118kB - application/octet-stream - Would you like to integrate these adjustments into your source file repository?)
file #27728:  36197b.diff added by elfring (180kB - application/octet-stream - Would you like to integrate these adjustments into your source file repository?)

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

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

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 30 Mar 2013 09:35:37 PM UTCelfringAttached File-=>Added 36197a.diff, #27727
      Attached File-=>Added 36197b.diff, #27728

    Back to the top


    Powered by Savane 3.1-cleanup