public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug objc/25450] Enums are encoded incorrectly
       [not found] <bug-25450-4@http.gcc.gnu.org/bugzilla/>
@ 2010-09-26 19:26 ` nicola at gcc dot gnu.org
  2010-09-28  2:45 ` nicola at gcc dot gnu.org
  2010-09-28  8:39 ` nicola at gcc dot gnu.org
  2 siblings, 0 replies; 5+ messages in thread
From: nicola at gcc dot gnu.org @ 2010-09-26 19:26 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25450

Nicola Pero <nicola at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |nicola at gcc dot gnu.org
         AssignedTo|unassigned at gcc dot       |nicola at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #3 from Nicola Pero <nicola at gcc dot gnu.org> 2010-09-26 16:44:43 UTC ---
Posted a patch to gcc-patches that fixes this.

Thanks


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug objc/25450] Enums are encoded incorrectly
       [not found] <bug-25450-4@http.gcc.gnu.org/bugzilla/>
  2010-09-26 19:26 ` [Bug objc/25450] Enums are encoded incorrectly nicola at gcc dot gnu.org
@ 2010-09-28  2:45 ` nicola at gcc dot gnu.org
  2010-09-28  8:39 ` nicola at gcc dot gnu.org
  2 siblings, 0 replies; 5+ messages in thread
From: nicola at gcc dot gnu.org @ 2010-09-28  2:45 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25450

--- Comment #4 from Nicola Pero <nicola at gcc dot gnu.org> 2010-09-27 19:22:17 UTC ---
Author: nicola
Date: Mon Sep 27 19:22:13 2010
New Revision: 164659

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=164659
Log:
In gcc/:
2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        * doc/objc.texi (Type encoding): Added the new 'long double' (D)
        code.  Added byref, which was missing in the list of codes.
        Explain that enumeration values are encoded as the integer type
        that the compiler uses to store them.  Explain and make examples
        of how 'const' interacts with pointers, and the complication of
        the encoding of 'const char *'.
        (Legacy type encoding): New subsection, explaining that GCC emits
        incorrect type encodings for the NeXT runtime for compatibility
        reasons.
        (@@encode): New subsection, explaining @encode and particularly
        that protocol qualifiers are not recognized inside an @encode()
        expression.
        (Method signatures): New subsection, explaining how method
        signatures are encoded.

In gcc/objc/:
2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        PR objc/45763
        PR objc/25450
        PR objc/25464
        * objc-act.c: Improved comments for encoding functions.
        (encode_aggregate_within): For the GNU runtime, rewritten some
        obsfuscated code to clarify the various cases.
        (encode_aggregate): Function removed.
        (encode_array): Generate an error if asked to encode an incomplete
        array as part of generating instance variables.  Else, when
        encoding an incomplete array inside a structure, encode it as an
        array of zero size.
        (encode_pointer): For the GNU runtime, fixed encoding 'BOOL *' as
        '^c' instead of '*'.
        (encode_gnu_bitfield): Encode enumerated types exactly in the same
        type as integer types instead of using a hardcoded 'i'.  If asked
        to encode a non-integer type as a bitfield, do not abort
        compilation immediately; instead generate an error, then skip the
        type.
        (encode_type): Use a 'switch' instead of a sequence of 'if's.
        Added a 'default' clause that gets executed if the type can not be
        matched, and that encodes it as '?' (unknown) and produces a
        warning.  For the GNU runtime, encode enumerated types exactly in
        the same way as integer types instead of using a hardcoded 'i'.
        Encode long double as 'D'.  Encode 128-bit integers as 'T' or 't'.
        Encode C++ reference types as pointers.  Call encode_vector to
        encode vectors.
        (encode_vector): New function.

2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers.  I modified the
        changes to be used only when compiling for the NeXT runtime.

        2005-10-10  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4301047

        * objc-act.c (encode_type): Remove the hack.

        2005-07-20  Ziemowit Laski  <zlaski@apple.com>

        Radar 4136935
        * objc-act.c (pointee_is_readonly): New function.
        (encode_pointer, encode_aggregate_within, encode_type):
        Attempt to emulate GCC 3.3 when generating type encodings.

In gcc/testsuite/:
2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        PR objc/25464
        * objc.dg/type-size-3.m: New test.

2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        PR objc/45763
        * objc.dg/encode-1.m: Execute the test with the GNU runtime as
        well.

2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        PR objc/25450
        * objc.dg/encode-3.m: Updated for fix of encoding of enums.
        * objc.dg/type-size-2.m: Same change.
        * obj-c++.dg/encode-5.mm: Same change.

2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers.  The original
        Changelogs are below.

        * objc.dg/encode-6.m: Execute the test only with the GNU runtime.
        * objc.dg/encode-6-next.m: New file (from encode-6.m in the
        branch).
        * objc.dg/encode-7-next.m: New file (from encode-7.m in the
        branch).
        * objc.dg/encode-7-next-64bit.m: New file (from encode-7-64bit.m
        in the branch).
        * objc.dg/proto-qual-1.m: Test the 3.3 ABI on NeXT (from
        proto-qual-1.m in the branch) and the normal ABI on GNU.
        * objc.dg/threedotthree-abi-1.m: New file (from the branch).  Run
        the test only with the NeXT runtime.
        * obj-c++/encode-1.mm: Execute the test only with the GNU runtime.
        * obj-c++/encode-1-next.mm: New file (from encode-1.mm in the
        branch).
        * obj-c++.dg/threedotthree-abi-1.mm: New file (from the branch).
        Run the test only with the NeXT runtime.

        2006-03-30 Fariborz Jahanian <fjahanian@apple.com>

        Radar 4492973
        * objc.dg/encode-7-64bit.m: New.
        * objc.dg/encode-7.m: Skip if -m64.

        2005-10-19  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4301047
        * objc.dg/proto-qual-1.m: Fix test to match 3.3 ABI
        * obj-c++.dg/threedotthree-abi-1.mm: New
        * objc.dg/threedotthree-abi-1.m: New

        2005-07-20  Ziemowit Laski  <zlaski@apple.com>

        Radar 4136935
        * obj-c++.dg/encode-1.mm: Tweak encodings to match fix.
        * objc.dg/encode-6.m: Likewise.
        * objc.dg/encode-7.m: New test case.

In libobjc/:
2010-09-26  Nicola Pero  <nicola.pero@meta-innovation.com>

        * encoding.c (objc_sizeof_type): Added support for vector type and
        for double long types.
        (objc_alignof_type): Same change.
        (objc_skip_typespec): Same change.
        * objc/encoding.h (_C_GCINVISIBLE): Use '|' for _C_GCINVISIBLE
        instead of '!' since '!' is already used for _C_VECTOR.
        * objc/objc-api.h (_C_LNG_DBL): Added.

Added:
    trunk/gcc/testsuite/obj-c++.dg/encode-1-next.mm
    trunk/gcc/testsuite/obj-c++.dg/threedotthree-abi-1.mm
    trunk/gcc/testsuite/objc.dg/encode-6-next.m
    trunk/gcc/testsuite/objc.dg/encode-7-next-64bit.m
    trunk/gcc/testsuite/objc.dg/encode-7-next.m
    trunk/gcc/testsuite/objc.dg/threedotthree-abi-1.m
    trunk/gcc/testsuite/objc.dg/type-size-3.m
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/doc/objc.texi
    trunk/gcc/objc/ChangeLog
    trunk/gcc/objc/objc-act.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/obj-c++.dg/encode-1.mm
    trunk/gcc/testsuite/obj-c++.dg/encode-5.mm
    trunk/gcc/testsuite/objc.dg/encode-1.m
    trunk/gcc/testsuite/objc.dg/encode-3.m
    trunk/gcc/testsuite/objc.dg/encode-6.m
    trunk/gcc/testsuite/objc.dg/proto-qual-1.m
    trunk/gcc/testsuite/objc.dg/type-size-2.m
    trunk/libobjc/ChangeLog
    trunk/libobjc/encoding.c
    trunk/libobjc/objc/encoding.h
    trunk/libobjc/objc/objc-api.h


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug objc/25450] Enums are encoded incorrectly
       [not found] <bug-25450-4@http.gcc.gnu.org/bugzilla/>
  2010-09-26 19:26 ` [Bug objc/25450] Enums are encoded incorrectly nicola at gcc dot gnu.org
  2010-09-28  2:45 ` nicola at gcc dot gnu.org
@ 2010-09-28  8:39 ` nicola at gcc dot gnu.org
  2 siblings, 0 replies; 5+ messages in thread
From: nicola at gcc dot gnu.org @ 2010-09-28  8:39 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25450

Nicola Pero <nicola at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #5 from Nicola Pero <nicola at gcc dot gnu.org> 2010-09-27 19:34:59 UTC ---
Fixed in trunk.

Thanks


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug objc/25450] Enums are encoded incorrectly
  2005-12-16 17:21 [Bug objc/25450] New: " pinskia at gcc dot gnu dot org
  2005-12-16 17:29 ` [Bug objc/25450] " pinskia at gcc dot gnu dot org
@ 2005-12-23  5:50 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-12-23  5:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2005-12-23 05:50 -------
Confirmed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |wrong-code
   Last reconfirmed|0000-00-00 00:00:00         |2005-12-23 05:50:18
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25450


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug objc/25450] Enums are encoded incorrectly
  2005-12-16 17:21 [Bug objc/25450] New: " pinskia at gcc dot gnu dot org
@ 2005-12-16 17:29 ` pinskia at gcc dot gnu dot org
  2005-12-23  5:50 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-12-16 17:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2005-12-16 17:29 -------
The enum should be
enum a
{
  b = 0, c = 1, d =0x7FFFFFFFFFFFFFFFULL
};


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25450


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-09-27 19:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-25450-4@http.gcc.gnu.org/bugzilla/>
2010-09-26 19:26 ` [Bug objc/25450] Enums are encoded incorrectly nicola at gcc dot gnu.org
2010-09-28  2:45 ` nicola at gcc dot gnu.org
2010-09-28  8:39 ` nicola at gcc dot gnu.org
2005-12-16 17:21 [Bug objc/25450] New: " pinskia at gcc dot gnu dot org
2005-12-16 17:29 ` [Bug objc/25450] " pinskia at gcc dot gnu dot org
2005-12-23  5:50 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).