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.

Submitted by:  James Michael DuPont <mdupont>
Submitted on:  Sat 09 Aug 2003 02:41:30 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned 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>
Project 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>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

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 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sun 10 Aug 2003 12:40:09 AM UTCrweatherStatusNone=>(Error - Not Found)
  Open/ClosedOpen=>(Error - Not Found)

Back to the top


Powered by Savane 3.1-cleanup1