bugDotGNU Portable.NET - Bugs: bug #4689, [PNET/C] [PARSER/DATATYPE] Problem...

 
 

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

bug #4689: [PNET/C] [PARSER/DATATYPE] Problem with using a field name that is already a datatype.

Submitter:  James Michael DuPont <mdupont>
Submitted:  Sat 09 Aug 2003 02:41:30 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Sun 10 Aug 2003 04:09:21 AM UTC, comment #2: 

Good point, btw :
This is done in the pnet itself :

"uint" is defined in sys/types.h and as a field in ffi.h,

cheers,
mike

# 148 "/usr/include/sys/types.h" 2 3
[....]
typedef unsigned int uint;

# 363 "../libffi/include/ffi.h"
typedef union {
  int sint;
  unsigned int uint_value; /*MDUPONT : was uint, bug number https://savannah.gnu.org/bugs/?func=detailbug&bug_id=4689&group_id=353 */
  float flt;
  char data[4];
  void* ptr;
} ffi_raw;

James Michael DuPont <mdupont>
Sun 10 Aug 2003 12:40:09 AM UTC, comment #1: 

Fix committed to CVS - 10 Aug 2003

BTW, don't do this - it is bad coding practice and
probably won't work on non-gcc C compilers.

Rhys Weatherley <rweather>
Group administrator
Sat 09 Aug 2003 02:41:30 PM UTC, original submission:  

The following snippet of code shows you a bug in the typedef handling system. You need to look for the field before resolving the typedef.
###########################################
##########################################
typedef unsigned int datatype;
typedef union {
  unsigned int datatype;
  void* ptr;
} my_union;


/*

cscc test_local_name.c
test_local_name.c:3: syntax error, unexpected ';' at or near `;'
test_local_name.c:5: syntax error, unexpected '}' at or near `}'

*/

James Michael DuPont <mdupont>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2003-08-10 rweather StatusNone None
    Open/ClosedOpen None

Back to the top

Powered by Savane 3.13-d3ae.
Corresponding source code