<commit_before>//All three of these cases work in gcc, but fail in CIL.  The first case was
//a problem for OpenSSH, which uses something like the declaration of tmp
//below to initialize a string buffer


#include "testharness.h"

#define A_STRING "a string literal for testing."
int main()
{
  char tmp[sizeof(A_STRING)] = A_STRING;

  //This fails because cabs2CIL thinks sizeof(A_STRING) == 4
  if( sizeof(tmp) != 30 )  E(1);

  //This fails on CCured only because markptr inserts a cast to char*
  if( sizeof("Hello, world.") != 14 )  E(2);

  //This fails because the CIL conversion drops the char* cast.
  if( sizeof((char*)"Hello, world.") != 4 )  E(3);

  SUCCESS;
}
<commit_msg>partial fix for one stringsize case, but boxing still doesn't handle this.  Also fixed strignsize.c to show the error correctly.<commit_after>//All three of these cases work in gcc, but fail in CIL.  The first case was
//a problem for OpenSSH, which uses something like the declaration of tmp
//below to initialize a string buffer


#include "testharness.h"

#define A_STRING "a string literal for testing."
int main()
{
  char tmp[sizeof(A_STRING)] = A_STRING;

  //This fails because cabs2CIL thinks sizeof(A_STRING) == 4,
  //so the array is not completely initialized.
  if( sizeof(tmp) != 30 )  E(1);
  if( tmp[10] != (A_STRING)[10] )  E(1);

  //This fails on CCured only because markptr inserts a cast to char*
  if( sizeof("Hello, world.") != 14 )  E(2);

  //This fails because the CIL conversion drops the char* cast.
  if( sizeof((char*)"Hello, world.") != 4 )  E(3);

  SUCCESS;
}

{'fraction_non_alphanumeric': 0.11764705882352941, 'fraction_numerical': 0.015812776723592662, 'mean_word_length': 3.6666666666666665, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6854210', 'n_tokens_mistral': 531, 'n_tokens_neox': 496, 'n_words': 214}