Changeset b6d7f44 for src


Ignore:
Timestamp:
May 6, 2018, 11:24:17 PM (7 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, with_gc
Children:
01ff4e1, 10cfad9
Parents:
7867eb9
Message:

adjust compiler specific #if

Location:
src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/Common/utility.h

    r7867eb9 rb6d7f44  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu May  3 12:18:31 2018
    13 // Update Count     : 39
     12// Last Modified On : Sun May  6 22:24:16 2018
     13// Update Count     : 40
    1414//
    1515
     
    442442template<typename T>
    443443inline
    444 #if __GNUC__ > 4
     444#if defined(__GNUC__) && __GNUC__ > 4
    445445constexpr
    446446#endif
  • src/libcfa/time.c

    r7867eb9 rb6d7f44  
    1010// Created On       : Tue Mar 27 13:33:14 2018
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat May  5 09:04:51 2018
    13 // Update Count     : 36
     12// Last Modified On : Sun May  6 22:26:00 2018
     13// Update Count     : 37
    1414//
    1515
     
    8989        tm tm;
    9090        gmtime_r( &s, &tm );                                                            // tm_mon <= 11, tm_mday <= 31
     91#if defined(__GNUC__) && __GNUC__ >= 7
    9192#pragma GCC diagnostic push
    9293#pragma GCC diagnostic ignored "-Wformat-truncation"
     94#endif
    9395        snprintf( buf, 9, "%02d/%02d/%02d", tm.tm_year % 99, tm.tm_mon + 1, tm.tm_mday );
     96#if defined(__GNUC__) && __GNUC__ >= 7
    9497#pragma GCC diagnostic pop
     98#endif
    9599        return buf;
    96100} // yy_mm_dd
     
    100104        tm tm;
    101105        gmtime_r( &s, &tm );                                                            // tm_mon <= 11, tm_mday <= 31
     106#if defined(__GNUC__) && __GNUC__ >= 7
    102107#pragma GCC diagnostic push
    103108#pragma GCC diagnostic ignored "-Wformat-truncation"
     109#endif
    104110        snprintf( buf, 9, "%02d/%02d/%02d", tm.tm_mon + 1, tm.tm_mday, tm.tm_year % 99 );
     111#if defined(__GNUC__) && __GNUC__ >= 7
    105112#pragma GCC diagnostic pop
     113#endif
    106114        return buf;
    107115} // mm_dd_yy
     
    111119        tm tm;
    112120        gmtime_r( &s, &tm );                                                            // tm_mon <= 11, tm_mday <= 31
     121#if defined(__GNUC__) && __GNUC__ >= 7
    113122#pragma GCC diagnostic push
    114123#pragma GCC diagnostic ignored "-Wformat-truncation"
     124#endif
    115125        snprintf( buf, 9, "%02d/%02d/%02d", tm.tm_mday, tm.tm_mon + 1, tm.tm_year % 99 );
     126#if defined(__GNUC__) && __GNUC__ >= 7
    116127#pragma GCC diagnostic pop
     128#endif
    117129        return buf;
    118130} // dd_mm_yy
  • src/main.cc

    r7867eb9 rb6d7f44  
    1010// Created On       : Fri May 15 23:12:02 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed May  2 14:59:02 2018
    13 // Update Count     : 490
     12// Last Modified On : Sun May  6 22:25:59 2018
     13// Update Count     : 491
    1414//
    1515
     
    534534                                assertf( false, "Unknown option: %s\n", argv[optind - 1] );
    535535                        } // if
    536                         #if __GNUC__ < 7
    537                         #else
     536                        #if defined(__GNUC__) && __GNUC__ >= 7
    538537                                __attribute__((fallthrough));
    539538                        #endif
Note: See TracChangeset for help on using the changeset viewer.