This is the mail archive of the gcc-patches@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: [patch]: New feature __int128 type C/C++ for upcoming 4.6 for review


On Sun, 10 Jan 2010, Kai Tietz wrote:

> So I adjusted patch for documentation (without this typo). Additional
> I attached an generated test file by your script for type checking.

You appear not to have read my comments properly, since you have not 
updated the comment at the top of the testcase.

The aim is not to duplicate the previous tests.  The aim is to test 
relevant cases *that include __int128*.

The script will generate all sequences of specifiers until it reaches a 
sequence that is invalid, but not generate further extensions of an 
invalid sequence.  (For the strict C99 test, the script used has 
additional code to handle invalid sequences that are initial subsequences 
of valid ones - _Complex and long _Complex / _Complex long - so that it 
does consider extending those, but if you are doing a gnu99-mode test then 
that is irrelevant.)

So you should make the script include all valid sequences for gnu99 - 
including ones with _Complex and ones with __int128.  But it should only 
output tests for those cases - valid or invalid - that include __int128.  
The comment it generates should accurately describe the test it generates, 
not some other test generated long ago.  It may be useful to post the 
script you use.

> Just out of interest, why do you think that 'int' shouldn't be
> optional part of the new '__int128'. AFAICS all other integer scalar
> types can be combined by it. Wouldn't it be more consistent to do this
> for the new type, too?

__int128 should be considered to be more like int (or void or char or 
float or double or _Bool) than like long, and "int int" is not valid.  So 
it should be handled in the code that handles those specifiers, and get 
the "two or more data types in declaration specifiers" error if used with 
any of them.

This type comes from the x86_64 ABI.  The types it lists are __int128, 
signed __int128 and unsigned __int128 (unfortunately there isn't a 
corresponding API document to define these extensions precisely).  (The 
only difference between __int128 and signed __int128 should be the 
signedness of bit-fields with -funsigned-bitfields.)

-- 
Joseph S. Myers
joseph@codesourcery.com


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