This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c/10406: Suggestion for variable attribute "default"


> It is at least same unimportant as some other attributes like
> transparent_union, unused, deprecated or weak.

Attribute unused is used in cases where in C++ you can write
  void f(int /*p*/) {
    ...; /* doesn't use p, but did in the past; we don't want to change 
            the prototype, though */
  }
which you can't do in C.

Deprecated was deemed useful enough to be included into the Java standard.

Attribute weak changes the semantics of a function w.r.t. the linker.

That being said, it might well be that some of the attributes are useless. 
That should not tempt us into creating more uselessness, though.

IMHO, your proposal is absolutely useless, since
- one can get the same effect with a minimal change
- it would have a ridiculously far-reaching impact since it would 
  essentially introduce overloading assignment operators in C.

Wolfgang (certain to speak for the wider GCC community here)

-------------------------------------------------------------------------
Wolfgang Bangerth              email:            bangerth at ices dot utexas dot edu
                               www: http://www.ices.utexas.edu/~bangerth/



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]