]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
Daily bump.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
c65699ef
JM
12016-08-19 Joseph Myers <joseph@codesourcery.com>
2
3 PR c/32187
4 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
5 (struct c_declspecs): Add field floatn_nx_idx.
6 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
7 and _FloatNx type specifiers.
8 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
9 (c_parser_declspecs, c_parser_attribute_any_word)
10 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
11 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
12 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
13 narrower than double.
14
2f1364c2
JJ
152016-08-12 Jakub Jelinek <jakub@redhat.com>
16 Martin Liska <mliska@suse.cz>
17
18 PR c/67410
19 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
20 % to determine val element to change. Assert that
21 wchar_bytes * charwidth fits into val array.
22
191816a3
MP
232016-08-12 Marek Polacek <polacek@redhat.com>
24
25 PR c/7652
26 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
27 (c_parser_postfix_expression): Likewise.
28 * c-typeck.c (build_unary_op): Adjust fall through comment.
29 (c_mark_addressable): Likewise.
30
b95a64bb
JJ
312016-08-11 Jakub Jelinek <jakub@redhat.com>
32
33 PR c/72816
34 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
35 array member through typedef, for orig_qual_indirect == 0 clear
36 orig_qual_type.
37
895aa8e1
DM
382016-08-08 David Malcolm <dmalcolm@redhat.com>
39
40 PR c/64955
41 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
42 this up to selftest::run_c_tests.
43 (selftest::run_c_tests): New function.
44
0b212d8c
TS
452016-08-04 Thomas Schwinge <thomas@codesourcery.com>
46
ae9281fc
TS
47 * c-parser.c (struct oacc_routine_data): Add error_seen and
48 fndecl_seen members.
49 (c_finish_oacc_routine): Use these.
50 (c_parser_declaration_or_fndef): Adjust.
51 (c_parser_oacc_routine): Likewise. Support more C language
52 constructs, and improve diagnostics. Move pragma context
53 checking...
54 (c_parser_pragma): ... here.
55
0b212d8c
TS
56 * c-parser.c (struct oacc_routine_data): New.
57 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
58 Simplify code.
59 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
60 declare target" attribute.
61
76e2c821
JB
622016-08-01 Jan Beulich <jbeulich@suse.com>
63
64 * c-fold.c (c_fully_fold_internal): Also emit shift count
65 warnings for vector types.
66 * c-typeck.c (build_binary_op): Likewise.
67
f618a472
MP
682016-07-29 Marek Polacek <polacek@redhat.com>
69
70 PR c/71742
71 * c-decl.c (finish_struct): Rephrase an error message.
72
efd0786f
MP
73 PR c/71853
74 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
75 to error node for invalid code.
76
e00dceaf
MP
77 PR c/71573
78 * c-decl.c (implicitly_declare): Return decl early not only for
79 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
80
673a107a
JJ
812016-07-29 Jakub Jelinek <jakub@redhat.com>
82
83 PR c/71969
84 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
85 on GNU extern inline functions.
86
a5b5c8b6
MP
872016-07-29 Marek Polacek <polacek@redhat.com>
88
89 PR c/71583
90 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
91 check expr.value.
92
e3fe09c1
UB
932016-07-22 Uros Bizjak <ubizjak@gmail.com>
94
95 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
96
7c8f7eaa
DM
972016-07-20 David Malcolm <dmalcolm@redhat.com>
98
99 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
100 spellcheck-tree.h
101 (best_macro_match): Likewise, converting from a typedef to a
102 subclass.
103 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
104 (lookup_name_fuzzy): Update for change of best_macro_match to a
105 subclass with a ctor that calls cpp_forall_identifiers.
106
de6a69ee
DM
1072016-07-20 David Malcolm <dmalcolm@redhat.com>
108
109 * c-decl.c (implicit_decl_warning): Update for conversion of
110 return type of lookup_name_fuzzy to const char *.
111 (undeclared_variable): Likewise.
112 (lookup_name_fuzzy): Convert return type from tree to
113 const char *.
114 * c-parser.c (c_parser_declaration_or_fndef): Update for
115 conversion of return type of lookup_name_fuzzy to const char *.
116 (c_parser_parameter_declaration): Likewise.
117
b1c9c068
CP
1182016-07-15 Cesar Philippidis <cesar@codesourcery.com>
119
120 * c-parser.c (c_parser_oacc_declare): Don't scan for
121 GOMP_MAP_POINTER.
122 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
123 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
124 zero-length subarrays.
125
ddbbcb19
JJ
1262016-07-15 Jakub Jelinek <jakub@redhat.com>
127
128 PR c/71858
129 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
130 instead of FUZZY_LOOKUP_NAME.
131 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
132 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
133
dd36b877
JJ
1342016-07-14 Jakub Jelinek <jakub@redhat.com>
135
136 PR c/71858
137 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
138
8c681247
TS
1392016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
140
141 * c-parser.c (c_parser_generic_selection): Make type of variable
142 auto_vec.
143 (c_parser_omp_declare_simd): Likewise.
144
bf4fa671
TS
1452016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
146
147 * c-decl.c (struct c_struct_parse_info): Change member types
148 from vec to auto_vec.
149 (start_struct): Adjust.
150 (finish_struct): Likewise.
151
557e8c49
JJ
1522016-07-02 Jakub Jelinek <jakub@redhat.com>
153
154 PR c/71719
155 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
156
54d19c3b
TS
1572016-06-29 Thomas Schwinge <thomas@codesourcery.com>
158
159 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
160 Move pragma context checking into...
161 (c_parser_omp_cancellation_point): ... here, and improve
162 diagnostic messages.
163 * c-typeck.c (c_finish_omp_cancel)
164 (c_finish_omp_cancellation_point): Improve diagnostic messages.
165
152ef731
JJ
1662016-06-29 Jakub Jelinek <jakub@redhat.com>
167
168 PR c/71685
169 * c-typeck.c (c_build_qualified_type): Don't clear
170 C_TYPE_INCOMPLETE_VARS for the main variant.
171
1722016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
173
174 PR c/71552
175 * c-typeck.c (output_init_element): Diagnose incompatible types
176 before non-constant initializers.
177
e9ac1f86
JJ
1782016-06-28 Jakub Jelinek <jakub@redhat.com>
179
180 * Make-lang.in: Don't cat ../stage_current if it does not exist.
181
277d7ee0
AK
1822016-06-23 Andi Kleen <ak@linux.intel.com>
183
184 * Make-lang.in: Add support for autofdo.
185
1a4f11c8
DM
1862016-06-22 David Malcolm <dmalcolm@redhat.com>
187
188 PR c/70339
189 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
190 (implicit_decl_warning): When issuing warnings for implicit
191 declarations, attempt to provide a suggestion via
192 lookup_name_fuzzy.
193 (undeclared_variable): Likewise when issuing errors.
194 (lookup_name_in_scope): Likewise.
195 (struct edit_distance_traits<cpp_hashnode *>): New struct.
196 (best_macro_match): New typedef.
197 (find_closest_macro_cpp_cb): New function.
198 (lookup_name_fuzzy): New function.
199 * c-parser.c: Include gcc-rich-location.h.
200 (c_token_starts_typename): Split out case CPP_KEYWORD into...
201 (c_keyword_starts_typename): ...this new function.
202 (c_parser_declaration_or_fndef): When issuing errors about
203 missing "struct" etc, add a fixit. For other kinds of errors,
204 attempt to provide a suggestion via lookup_name_fuzzy.
205 (c_parser_parms_declarator): When looking ahead to detect typos in
206 type names, also reject CPP_KEYWORD.
207 (c_parser_parameter_declaration): When issuing errors about
208 unknown type names, attempt to provide a suggestion via
209 lookup_name_fuzzy.
210 * c-tree.h (c_keyword_starts_typename): New prototype.
211
5a578671
JM
2122016-06-20 Joseph Myers <joseph@codesourcery.com>
213
214 PR c/71601
215 * c-typeck.c (build_conditional_expr): Return error_mark_node if
216 c_common_type returns error_mark_node.
217
aa0db437
MS
2182016-06-19 Martin Sebor <msebor@redhat.com>
219
220 PR c/69507
221 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
222 __alignof__ (expression).
223
6a3f203c
DM
2242016-06-14 David Malcolm <dmalcolm@redhat.com>
225
226 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
227
264757fb
DM
2282016-06-14 David Malcolm <dmalcolm@redhat.com>
229
230 * c-typeck.c (build_component_ref): Simplify fixit code by
231 using gcc_rich_location::add_fixit_misspelled_id.
232 (set_init_label): Likewise.
233
f7e4f2e3
DM
2342016-06-13 David Malcolm <dmalcolm@redhat.com>
235
236 * c-parser.c (c_parser_initelt): Provide location of name for new
237 location_t param of set_init_label.
238 * c-tree.h (set_init_label): Add location_t param.
239 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
240 param and use it when issuing error messages about unrecognized
241 field names. Attempt to provide a fixit hint if appropriate,
242 otherwise update the error message to provide the type name.
243
4b1ffdb1
TS
2442016-06-10 Thomas Schwinge <thomas@codesourcery.com>
245
246 PR c/71381
247 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
248 Loosen checking.
249
44a845ca
MS
2502016-06-08 Martin Sebor <msebor@redhat.com>
251 Jakub Jelinek <jakub@redhat.com>
252
253 PR c++/70507
254 PR c/68120
255 * c-typeck.c (convert_arguments): Don't promote last argument
256 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
257
92a5f2ba
MP
2582016-06-08 Marek Polacek <polacek@redhat.com>
259
260 PR c/71418
261 * c-decl.c (grokdeclarator): Check TYPE_P.
262
08203f73
MP
263 PR c/71426
264 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
265 code.
266
6ffd47b7
DM
2672016-06-07 David Malcolm <dmalcolm@redhat.com>
268
269 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
270 and structure element reference, capture the location of the
271 element name token and pass it to build_component_ref.
272 (c_parser_postfix_expression_after_primary): Likewise for
273 structure element dereference.
274 (c_parser_omp_variable_list): Likewise for
275 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
276 * c-tree.h (build_component_ref): Add location_t param.
277 * c-typeck.c (build_component_ref): Add location_t param
278 COMPONENT_LOC. Use it, if available, when issuing hints about
279 mispelled member names to provide a fixit replacement hint.
280
1f40cff3
MP
2812016-06-06 Marek Polacek <polacek@redhat.com>
282
283 PR c/71362
284 * c-parser.c (c_parser_direct_declarator): Set location.
285
5545a907
MP
2862016-06-06 Marek Polacek <polacek@redhat.com>
287
288 * c-typeck.c (comptypes_internal): Handle comparisons of
289 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
290 TYPE_REF_CAN_ALIAS_ALL.
291
b605f663
CLT
2922016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
293
294 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
295 arguments as addressable when async clause exists.
296
00631022
JJ
2972016-05-30 Jakub Jelinek <jakub@redhat.com>
298
299 PR c++/71349
300 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
301 when combined with target construct.
302
7211a097
JJ
3032016-05-26 Jakub Jelinek <jakub@redhat.com>
304
305 * c-parser.c (c_parser_omp_clause_schedule): Warn if
306 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
307
95efe6b6
MP
3082016-05-25 Marek Polacek <polacek@redhat.com>
309
310 PR c/71265
311 * c-decl.c (c_make_fname_decl): Don't check seen_error.
312
a23faf7a
MP
313 PR c/71266
314 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
315
e46c7770
CP
3162016-05-24 Cesar Philippidis <cesar@codesourcery.com>
317
318 * c-parser.c (c_parser_oacc_declare): Add support for
319 GOMP_MAP_FIRSTPRIVATE_POINTER.
320 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
321 argument with enum c_omp_region_type ort.
322 (handle_omp_array_sections): Likewise. Update call to
323 handle_omp_array_sections_1.
324 (c_finish_omp_clauses): Add specific errors and warning messages for
325 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
326 call to handle_omp_array_sections.
327
a04e69c0
TS
3282016-05-24 Thomas Schwinge <thomas@codesourcery.com>
329
330 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
331
f17a223d
RB
3322016-05-24 Richard Biener <rguenther@suse.de>
333
334 PR middle-end/70434
335 PR c/69504
336 * c-typeck.c (build_array_ref): Do not complain about indexing
337 non-lvalue vectors. Adjust for function name change.
338
79063edd
MS
3392016-05-20 Martin Sebor <msebor@redhat.com>
340
341 PR c/71115
342 * c-typeck.c (error_init): Use
343 expansion_point_location_if_in_system_header.
344 (warning_init): Same.
345
8a40fef3
DM
3462016-05-19 David Malcolm <dmalcolm@redhat.com>
347
348 PR c/71171
349 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
350 in error-handling.
351 (c_parser_postfix_expression): Likewise.
352 * c-tree.h (c_expr::set_error): New method.
353 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
354 that result's range is initialized.
355
e9892350
JG
3562016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
357
358 * c-typeck.c (parser_build_unary_op): Fix formatting.
359
8fad45f5
MW
3602016-05-16 Matthew Wahab <matthew.wahab@arm.com>
361
362 * c-decl.c (grokdeclarator): Remove errmsg and use of
363 targetm.invalid_return_type.
364 (grokparms): Remove errmsg and use of
365 targetm.invalid_parameter_type.
366
aa4b467b
JM
3672016-05-13 Joseph Myers <joseph@codesourcery.com>
368
369 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
370 function return type.
371
4f2e1536
MP
3722016-05-12 Marek Polacek <polacek@redhat.com>
373
374 PR c/70756
375 * c-decl.c (build_compound_literal): Pass LOC down to
376 c_incomplete_type_error.
377 * c-tree.h (require_complete_type): Adjust declaration.
378 (c_incomplete_type_error): Likewise.
379 * c-typeck.c (require_complete_type): Add location parameter, pass it
380 down to c_incomplete_type_error.
381 (c_incomplete_type_error): Add location parameter, pass it down to
382 error_at.
383 (build_component_ref): Pass location down to c_incomplete_type_error.
384 (default_conversion): Pass location down to require_complete_type.
385 (build_array_ref): Likewise.
386 (build_function_call_vec): Likewise.
387 (convert_arguments): Likewise.
388 (build_unary_op): Likewise.
389 (build_c_cast): Likewise.
390 (build_modify_expr): Likewise.
391 (convert_for_assignment): Likewise.
392 (c_finish_omp_clauses): Likewise.
393
d6e83a8d
MM
3942016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
395
396 PR c/43651
397 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
398 is enabled.
399 * c-errors.c (pedwarn_c90): Return true if warned.
400 * c-tree.h (pedwarn_c90): Change return type to bool.
401 (enum c_declspec_word): Add new enumerator cdw_atomic.
402
5c3a10fb
MP
4032016-05-11 Marek Polacek <polacek@redhat.com>
404
405 PR c++/71024
406 * c-decl.c (diagnose_mismatched_decls): Factor out code to
407 diagnose_mismatched_attributes and call it.
408
cf68d92c
MP
4092016-05-10 Marek Polacek <polacek@redhat.com>
410
411 PR c/70255
412 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
413 on a declaration following the definition.
414
351f85c5
JJ
4152016-05-05 Jakub Jelinek <jakub@redhat.com>
416
417 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
418 parse it through to c_parser_c99_block_statement.
419 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
420 caller.
421
deef7113
MP
4222016-05-04 Marek Polacek <polacek@redhat.com>
423
424 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
425 OPT_Wdangling_else.
426
de55efd5
MP
4272016-05-04 Marek Polacek <polacek@redhat.com>
428
429 PR c/48778
430 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
431 for macro expansions.
432
79ce98bc
MP
4332016-05-03 Marek Polacek <polacek@redhat.com>
434
435 PR c/70859
436 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
437 check_builtin_function_arguments.
438
fb2647aa
RB
4392016-05-03 Richard Biener <rguenther@suse.de>
440
441 * Make-lang.in (cc1-checksum.c): For stage-final re-use
442 the checksum from the previous stage.
443
77886428
CP
4442016-05-02 Cesar Philippidis <cesar@codesourcery.com>
445
446 * c-parser.c (c_parser_oacc_all_clauses): Update call to
447 c_finish_omp_clauses.
448 (c_parser_omp_all_clauses): Likewise.
449 (c_parser_oacc_cache): Likewise.
450 (c_parser_oacc_loop): Likewise.
451 (omp_split_clauses): Likewise.
452 (c_parser_omp_declare_target): Likewise.
453 (c_parser_cilk_all_clauses): Likewise.
454 (c_parser_cilk_for): Likewise.
455 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
456 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
457
7176a4a0
MP
4582016-05-02 Marek Polacek <polacek@redhat.com>
459
460 PR c/70851
461 * c-decl.c (grokdeclarator): Diagnose when array's size has an
462 incomplete type.
463
e7ff0319
CP
4642016-04-29 Cesar Philippidis <cesar@codesourcery.com>
465
466 PR middle-end/70626
467 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
468 OACC_LOOP_CLAUSE_MASK.
469 (c_parser_oacc_kernels_parallel): Update call to
470 c_oacc_split_loop_clauses.
471
9f405ce1
AM
4722016-04-28 Andrew MacLeod <amacleod@redhat.com>
473
474 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
475 argument to build_modify_expr in two cases.
476
c1e1f433
BS
4772016-04-27 Bernd Schmidt <bschmidt@redhat.com>
478
479 * c-parser.c (c_parser_postfix_expression_after_primary): Call
480 warn_for_memset instead of warning directly here.
481
2448a956
MP
4822016-04-26 Marek Polacek <polacek@redhat.com>
483
484 PR c/67784
485 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
486 out of ...
487 (c_parser_for_statement): ... here.
488 (c_parser_if_statement): Use it.
489 (c_parser_switch_statement): Use it.
490 (c_parser_while_statement): Use it.
491
b02a5e26
MP
492 PR c/70791
493 * c-decl.c (pushdecl): Pass LOCUS down to warning.
494
477d4906
IV
4952016-04-20 Ilya Verbin <ilya.verbin@intel.com>
496
497 PR c++/69363
498 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
499 instead of c_finish_cilk_clauses.
500 * c-tree.h (c_finish_omp_clauses): Add new default argument.
501 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
502 floating-point variables in the linear clause for Cilk Plus.
503
fe37c7af
MM
5042016-04-18 Michael Matz <matz@suse.de>
505
506 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
507 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
508
949505a9
MP
5092016-04-15 Marek Polacek <polacek@redhat.com>
510
511 PR c/70671
512 * c-typeck.c (build_unary_op): Pass location down to error and
513 warning call.
514
dda1bf61
JJ
5152016-04-15 Jakub Jelinek <jakub@redhat.com>
516
517 PR c/70436
518 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
519 where needed.
520 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
521 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
522 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
523 Adjust c_parser_pragma callers.
524 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
525 caller.
526 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
527 c_parser_statement.
528 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
529 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
530 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
531 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
532 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
533 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
534 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
535 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
536 down where needed.
537 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
538 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
539 calls.
540
99cd9857
MP
5412016-04-13 Marek Polacek <polacek@redhat.com>
542
543 PR c/70436
544 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
545 adjust callers.
546 (c_parser_statement): Likewise.
547 (c_parser_c99_block_statement): Likewise.
548 (c_parser_while_statement): Likewise.
549 (c_parser_for_statement): Likewise.
550 (c_parser_if_body): Don't set IF_P here.
551 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
552 about dangling else here.
553 * c-tree.h (c_finish_if_stmt): Adjust declaration.
554 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
555 warn about dangling else here.
556
f13355da
MP
5572016-04-04 Marek Polacek <polacek@redhat.com>
558
559 PR c/70307
560 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
561
5fde6a45
MP
5622016-03-31 Marek Polacek <polacek@redhat.com>
563
564 PR c/70297
565 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
566
4bbf545b
DM
5672016-03-18 David Malcolm <dmalcolm@redhat.com>
568
569 PR c/70281
570 * c-parser.c (c_parser_postfix_expression): Set the source range
571 for uses of "__builtin_types_compatible_p".
572
fcc2b74f
JJ
5732016-03-17 Jakub Jelinek <jakub@redhat.com>
574
575 PR c/70280
576 * c-typeck.c (composite_type): Don't count void_list_node
577 into len, if the list is terminated by void_list_node, start
578 with void_list_node instead of NULL for newargs. Stop
579 at void_list_node.
580
ab4c578f
MP
5812016-03-16 Marek Polacek <polacek@redhat.com>
582
583 PR c/70093
584 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
585 nested functions returning VM types.
586
96b3c82d
CP
5872016-03-09 Cesar Philippidis <cesar@codesourcery.com>
588
589 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
590 when calling c_finish_omp_clauses.
591
29b9828f
BS
5922016-03-04 Bernd Schmidt <bschmidt@redhat.com>
593
594 PR c/69824
595 * c-decl.c (get_parm_info): Don't queue implicit function declarations
596 for later.
597
7ff6ca38
MP
5982016-03-04 Marek Polacek <polacek@redhat.com>
599
600 PR c/69798
601 * c-parser.c (c_parser_postfix_expression): Call
602 c_parser_cast_expression rather than c_parser_postfix_expression.
603
686e2237
JJ
6042016-03-01 Jakub Jelinek <jakub@redhat.com>
605
606 PR c/69796
607 PR c/69974
608 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
609 of incomplete decls to error_mark_node.
610
0b05329b
MP
6112016-02-24 Marek Polacek <polacek@redhat.com>
612
613 PR c/69819
614 * c-decl.c (finish_decl): Don't update the copy of the type of a
615 different decl type.
616
067fbd8b
JJ
6172016-02-23 Jakub Jelinek <jakub@redhat.com>
618
619 PR objc/69844
620 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
621 in id_kind reclassification.
622
bf14eba2
JJ
6232016-02-16 Jakub Jelinek <jakub@redhat.com>
624
625 PR c/69835
626 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
627
ba539195
JN
6282016-02-16 James Norris <jnorris@codesourcery.com>
629
630 PR c/64748
631 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
632
16595a1f
BS
6332016-02-12 Bernd Schmidt <bschmidt@redhat.com>
634
f48dfe98
BS
635 * c-decl.c (build_null_declspecs): Zero the entire struct.
636
16595a1f
BS
637 PR c/69522
638 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
639 callers changed. If nested_p is true, use it to call
640 finish_implicit_inits.
641 * c-tree.h (finish_implicit_inits): Declare.
642 * c-typeck.c (finish_implicit_inits): New function. Move code
643 from ...
644 (push_init_level): ... here.
645 (set_designator, process_init_element): Call finish_implicit_inits.
646
66756373
JJ
6472016-02-11 Jakub Jelinek <jakub@redhat.com>
648
649 PR c/69768
650 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
651 arguments for -Waddress warning.
652
1066e9b5
JJ
6532016-02-04 Jakub Jelinek <jakub@redhat.com>
654
655 PR c/69669
656 * c-decl.c (finish_enum): When honoring mode attribute,
657 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
658
3a5d2ba4
JJ
6592016-01-29 Jakub Jelinek <jakub@redhat.com>
660
661 PR debug/69518
662 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
663 all type variants, not just TYPE_MAIN_VARIANT.
664
cbdd8ae0
JJ
6652016-01-27 Jakub Jelinek <jakub@redhat.com>
666
667 PR debug/66869
668 * c-decl.c (c_write_global_declarations_1): Warn with
669 warn_unused_function if static prototype without definition
670 is not C_DECL_USED.
671
fa74a4bc
MP
6722016-01-27 Marek Polacek <polacek@redhat.com>
673
674 PR c/68062
675 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
676 to unsigned, if needed. Add -Wsign-compare warning.
677
13f92e8d
JJ
6782016-01-26 Jakub Jelinek <jakub@redhat.com>
679
680 PR tree-optimization/69483
681 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
682
cd8e73dc 6832016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
684
685 PR c/24293
686 * c-tree.h (incomplete_record_decls): Declare.
687 * c-parser.c (incomplete_record_decls): Define.
688 (c_parser_translation_unit): Iterate through incomplete_record_decls and
689 report error if any decl has zero size.
690 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
691 or enum type to incomplete_record_decls.
692
e6d6ec9e
TV
6932016-01-14 Tom de Vries <tom@codesourcery.com>
694
695 PR tree-optimization/68773
696 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
697 set force_output.
698
00083992
MP
6992016-01-14 Marek Polacek <polacek@redhat.com>
700
701 PR c/69262
702 * c-decl.c (grokdeclarator): Provide more information for invalid
703 array declarations.
704
7443cf13
DM
7052016-01-06 David Malcolm <dmalcolm@redhat.com>
706
707 * c-parser.c (c_parser_unary_expression): For dereferences, build
708 a combined location before calling build_indirect_ref, so that
709 error reports cover the full range, manually updating the c_expr
710 src_range.
711
6b131d5b
MP
7122016-01-06 Marek Polacek <polacek@redhat.com>
713
714 PR sanitizer/69099
715 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
716 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
717 NULL.
718
818ab71a
JJ
7192016-01-04 Jakub Jelinek <jakub@redhat.com>
720
721 Update copyright years.
722
2fe0a208
MP
7232016-01-04 Marek Polacek <polacek@redhat.com>
724
725 PR c/68908
726 * c-typeck.c (build_atomic_assign): Improve commentary. Add
727 optimization to use __atomic_fetch_* built-in if possible.
728
c7b48c8a
TS
7292015-12-23 Thomas Schwinge <thomas@codesourcery.com>
730
731 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
732 into...
733 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
734 all users.
735
fda5652f
MP
7362015-12-22 Marek Polacek <polacek@redhat.com>
737
738 PR c/69002
739 * c-typeck.c (build_component_ref): Warn when acessing elements of
740 atomic structures or unions.
741
745e411d
DM
7422015-12-21 David Malcolm <dmalcolm@redhat.com>
743
744 * c-typeck.c: Include "gcc-rich-location.h".
745 (build_binary_op): In the two places that call binary_op_error,
746 create a gcc_rich_location and populate it with the location of
747 the binary op and its two operands.
748
94c40e19
DM
7492015-12-16 David Malcolm <dmalcolm@redhat.com>
750
751 * c-parser.c (c_parser_statement_after_labels): When calling
752 c_finish_return, Use the return expression's location if it has
753 one, falling back to the location of the first token within it.
754 * c-typeck.c (c_finish_return): When issuing warnings about
755 the incorrect presence/absence of a return value, issue a note
756 showing the declaration of the function.
757
de67c4c3
DM
7582015-12-16 David Malcolm <dmalcolm@redhat.com>
759
760 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
761 to 4.
762 (c_parser_peek_nth_token): New function.
763 (c_parser_peek_conflict_marker): New function.
764 (c_parser_error): Detect conflict markers and report them as such.
765
a10704e1
DM
7662015-12-16 David Malcolm <dmalcolm@redhat.com>
767
768 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
769 to preserve range information for the primary expression
770 in the call to c_parser_postfix_expression_after_primary.
771
8062bca6
DM
7722015-12-16 David Malcolm <dmalcolm@redhat.com>
773
774 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
775 expression location, falling back on the first token location,
776 rather than always using the latter.
777
d06f8b75
MP
7782015-12-16 Marek Polacek <polacek@redhat.com>
779
780 PR c/64637
781 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
782 available.
783
2994fb91
MP
7842015-12-15 Marek Polacek <polacek@redhat.com>
785
786 PR c/68907
787 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
788 artificial decl.
789
a1b93f8d
DM
7902015-12-08 David Malcolm <dmalcolm@redhat.com>
791
792 * c-parser.c (c_parser_alignof_expression): Capture location of
793 closing parenthesis (if any), or of end of unary expression, and
794 use it to build a src_range for the expression.
795
46c6e1e2
DM
7962015-12-08 David Malcolm <dmalcolm@redhat.com>
797
798 PR c/68757
799 * c-parser.c (c_parser_get_builtin_args): Add
800 "out_close_paren_loc" param, and write back to it.
801 (c_parser_postfix_expression): Capture the closing
802 parenthesis location for RID_CHOOSE_EXPR,
803 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
804 RID_BUILTIN_SHUFFLE and use it to set the source range
805 for such expressions; within RID_BUILTIN_COMPLEX set
806 the underlying location.
807
66189108
MP
8082015-12-07 Marek Polacek <polacek@redhat.com>
809
810 PR c/68668
811 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
812 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
813
f187980b
EB
8142015-12-04 Eric Botcazou <ebotcazou@adacore.com>
815
816 * c-tree.h (c_build_va_arg): Adjust prototype.
817 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
818 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
819 parameter, adjust throughout and issue an error if EXPR is a component
820 with reverse storage order.
821
4250754e
JM
8222015-12-02 Jason Merrill <jason@redhat.com>
823
824 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
825 (c_fully_fold_internal, decl_constant_value_for_optimization):
826 Move from c-common.c.
827 * c-tree.h: Declare decl_constant_value_for_optimization.
828 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
829
e9e32ee6
JM
8302015-12-02 Joseph Myers <joseph@codesourcery.com>
831
832 PR c/68162
833 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
834 following link from declarator to next declarator. Track original
835 qualified type and pass it to c_build_qualified_type.
836 * c-typeck.c (c_build_qualified_type): Add arguments
837 orig_qual_type and orig_qual_indirect.
838
ff7a55bf
TS
8392015-12-02 Thomas Schwinge <thomas@codesourcery.com>
840
841 * c-parser.c (c_parser_omp_clause_name)
842 (c_parser_oacc_all_clauses): Alphabetical sorting.
843
657e4e47
JJ
8442015-12-02 Jakub Jelinek <jakub@redhat.com>
845
846 PR c/68533
847 * c-decl.c (get_parm_info): Use b->locus instead of input_location
848 for diagnostics.
849
37d5ad46
JB
8502015-12-01 Julian Brown <julian@codesourcery.com>
851 Cesar Philippidis <cesar@codesourcery.com>
852 James Norris <James_Norris@mentor.com>
853
854 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
855 (c_parser_oacc_clause_use_device): New function.
856 (c_parser_oacc_all_clauses): Add use_device support.
857 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
858 (c_parser_oacc_host_data): New function.
859 (c_parser_omp_construct): Add host_data support.
860 * c-tree.h (c_finish_oacc_host_data): Add prototype.
861 * c-typeck.c (c_finish_oacc_host_data): New function.
862 (c_finish_omp_clauses): Add use_device support.
863
a4850ce9
JH
8642015-11-29 Jan Hubicka <hubicka@ucw.cz>
865
866 PR c/67106
867 * c-decl.c: Set TYPE_PACKED in variants.
868
b58d3df2
ML
8692015-11-27 Martin Liska <mliska@suse.cz>
870
871 PR c++/68312
872 * c-array-notation.c (fix_builtin_array_notation_fn):
873 Use release_vec_vec instead of vec::release.
874 (build_array_notation_expr): Likewise.
875 (fix_conditional_array_notations_1): Likewise.
876 (fix_array_notation_expr): Likewise.
877 (fix_array_notation_call_expr): Likewise.
878
aec17bfe
JJ
8792015-11-27 Jakub Jelinek <jakub@redhat.com>
880
881 PR c/63326
882 * c-parser.c (c_parser_compound_statement_nostart): If
883 last_label is true, use pragma_stmt instead of pragma_compound
884 as second c_parser_pragma argument.
885 (c_parser_omp_ordered, c_parser_omp_target_update,
886 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
887 false as second argument to c_parser_skip_to_pragma_eol after
888 diagnosing standalone directives used in pragma_stmt context.
889
688c4de0
IV
8902015-11-24 Ilya Verbin <ilya.verbin@intel.com>
891
892 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
893 with "if (ENABLE_OFFLOADING)".
894
cbd03aee
DM
8952015-11-23 David Malcolm <dmalcolm@redhat.com>
896
897 PR objc/68438
898 * c-parser.c (c_parser_postfix_expression): Set up source ranges
899 for various Objective-C constructs: Class.name syntax,
900 @selector(), @protocol(), @encode(), and [] message syntax.
901
a87a86e1
DM
9022015-11-20 David Malcolm <dmalcolm@redhat.com>
903
904 PR 62314
905 * c-typeck.c (should_suggest_deref_p): New function.
906 (build_component_ref): Special-case POINTER_TYPE when
907 generating a "not a structure of union" error message, and
908 suggest a "->" rather than a ".", providing a fix-it hint.
909
8ece8dfb
DM
9102015-11-19 David Malcolm <dmalcolm@redhat.com>
911
912 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
913 candidate into a new function, find_closest_identifier.
914
433068cc
MP
9152015-11-19 Marek Polacek <polacek@redhat.com>
916
917 PR c/68412
918 * c-typeck.c (parser_build_binary_op): Properly handle
919 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
920
bef08b71
DM
9212015-11-17 David Malcolm <dmalcolm@redhat.com>
922
923 * c-parser.c (set_c_expr_source_range): Bulletproof both
924 overloaded implementations against NULL expr->value.
925 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
926 values.
927 (c_parser_unary_expression): Likewise when handling addresses of
928 labels.
929 (c_parser_postfix_expression): Likewise for statement expressions,
930 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
931 __builtin_va_arg, and for __builtin_offset_of.
932 (c_parser_postfix_expression_after_paren_type): Initialize expr's
933 src_range using the range of the braced initializer.
934 (c_parser_transaction_expression): Set src_range for "ret" to a
935 sane pair of values.
936
fff77217
KY
9372015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
938
939 * c-parser.c (c_finish_omp_declare_simd): Look for
940 "simd" attribute as well. Update error message.
941
1d899da2
TS
9422015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
943
944 * c-parser.c (c_parser_omp_declare_target): Adjust.
945
e4606348
JJ
9462015-11-14 Jakub Jelinek <jakub@redhat.com>
947
948 * c-typeck.c (c_finish_omp_clauses): Don't mark
949 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
950
3e636daf
MP
9512015-11-14 Marek Polacek <polacek@redhat.com>
952
953 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
954 * c-typeck.c: Likewise.
955
ebedc9a3
DM
9562015-11-13 David Malcolm <dmalcolm@redhat.com>
957
958 * c-decl.c (warn_defaults_to): Pass line_table to
959 rich_location ctor.
960 * c-errors.c (pedwarn_c99): Likewise.
961 (pedwarn_c90): Likewise.
962 * c-parser.c (set_c_expr_source_range): New functions.
963 (c_token::get_range): New method.
964 (c_token::get_finish): New method.
965 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
966 based on the range from the start of the LHS to the end of the
967 RHS.
968 (c_parser_conditional_expression): Likewise, based on the range
969 from the start of the cond.value to the end of exp2.value.
970 (c_parser_binary_expression): Call set_c_expr_source_range on
971 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
972 (c_parser_cast_expression): Call set_c_expr_source_range on ret
973 based on the cast_loc through to the end of the expr.
974 (c_parser_unary_expression): Likewise, based on the
975 op_loc through to the end of op.
976 (c_parser_sizeof_expression) Likewise, based on the start of the
977 sizeof token through to either the closing paren or the end of
978 expr.
979 (c_parser_postfix_expression): Likewise, using the token range,
980 or from the open paren through to the close paren for
981 parenthesized expressions.
982 (c_parser_postfix_expression_after_primary): Likewise, for
983 various kinds of expression.
984 * c-tree.h (struct c_expr): Add field "src_range".
985 (c_expr::get_start): New method.
986 (c_expr::get_finish): New method.
987 (set_c_expr_source_range): New decls.
988 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
989 on ret for prefix unary ops.
990 (parser_build_binary_op): Likewise, running from the start of
991 arg1.value through to the end of arg2.value.
992
ec8b536f
MP
9932015-11-13 Marek Polacek <polacek@redhat.com>
994
995 PR c/68320
996 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
997
277fe616
DM
9982015-11-13 David Malcolm <dmalcolm@redhat.com>
999
1000 * c-typeck.c: Include spellcheck.h.
1001 (lookup_field_fuzzy_find_candidates): New function.
1002 (lookup_field_fuzzy): New function.
1003 (build_component_ref): If the field was not found, try using
1004 lookup_field_fuzzy and potentially offer a suggestion.
1005
6e232ba4
JN
10062015-11-12 James Norris <jnorris@codesourcery.com>
1007 Joseph Myers <joseph@codesourcery.com>
1008
1009 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
1010 (c_parser_omp_clause_name): Handle 'device_resident' clause.
1011 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1012 and PRAGMA_OMP_CLAUSE_LINK.
1013 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1014 and PRAGMA_OACC_CLAUSE_LINK.
1015 (OACC_DECLARE_CLAUSE_MASK): New definition.
1016 (c_parser_oacc_declare): New function.
1017
9be4f715
MP
10182015-11-12 Marek Polacek <polacek@redhat.com>
1019
1020 PR c/67784
1021 * c-parser.c (c_parser_for_statement): Reclassify the token in
1022 a correct scope.
1023
e78bede6
MP
10242015-11-11 Marek Polacek <polacek@redhat.com>
1025
1026 PR c/68107
1027 PR c++/68266
1028 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
1029 checking the size of an array.
1030
69f293c9
AM
10312015-11-11 Andrew MacLeod <amacleod@redhat.com>
1032
1033 * c-array-notation.c: Remove unused header files.
1034 * c-aux-info.c: Likewise.
1035 * c-convert.c: Likewise.
1036 * c-decl.c: Likewise.
1037 * c-errors.c: Likewise.
1038 * c-lang.c: Likewise.
1039 * c-objc-common.c: Likewise.
1040 * c-parser.c: Likewise.
1041 * c-typeck.c: Likewise.
1042 * gccspec.c: Likewise.
1043
3a40d81d
NS
10442015-11-09 Thomas Schwinge <thomas@codesourcery.com>
1045 Cesar Philippidis <cesar@codesourcery.com>
1046 James Norris <jnorris@codesourcery.com>
1047 Julian Brown <julian@codesourcery.com>
1048 Nathan Sidwell <nathan@codesourcery.com>
1049
1050 c/
1051 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
1052 routine arg.
1053 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
1054 (c_parser_pragma): Parse 'acc routine'.
1055 (OACC_ROUTINE_CLAUSE_MARK): Define.
1056 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
1057
fc402eec
AA
10582015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1059
1060 PR debug/67192
1061 * c-typeck.c (c_finish_loop): For unconditional loops, set the
1062 location of the backward-goto to the start of the loop body.
1063
f6b0b3db
AA
10642015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1065
1066 PR debug/67192
1067 * c-parser.c (c_parser_while_statement): Finish the loop before
1068 parsing ahead for misleading indentation.
1069 (c_parser_for_statement): Likewise.
1070
ee45a32d
EB
10712015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1072
1073 * c-decl.c (finish_struct): If the structure has reverse storage
1074 order, rewrite the type of array fields with scalar component. Call
1075 maybe_apply_pragma_scalar_storage_order on entry.
1076 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
1077 errors on bit-fields and reverse SSO here and not...
1078 (c_mark_addressable): ...here.
1079 (output_init_element): Adjust call to initializer_constant_valid_p.
1080 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
1081
8a645150
DM
10822015-11-06 David Malcolm <dmalcolm@redhat.com>
1083
1084 * c-decl.c (warn_defaults_to): Update for change in signature
1085 of diagnostic_set_info.
1086 * c-errors.c (pedwarn_c99): Likewise.
1087 (pedwarn_c90): Likewise.
1088 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
1089 for textinfo::set_location.
1090
7a5e4956
CP
10912015-11-05 Cesar Philippidis <cesar@codesourcery.com>
1092 Thomas Schwinge <thomas@codesourcery.com>
1093 James Norris <jnorris@codesourcery.com>
1094
1095 * c-parser.c (c_parser_omp_clause_name): Add support for
1096 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
1097 (c_parser_omp_clause_default): Add is_oacc argument. Handle
1098 default(none) in OpenACC.
1099 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
1100 arguments.
1101 (c_parser_oacc_clause_tile): New function.
1102 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
1103 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
1104 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
1105 TILE}.
1106 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
1107 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
1108 FIRSTPRIVATE}.
1109 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
1110 (c_parser_oacc_update): Update the error message for missing clauses.
1111 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
1112 and OMP_CLAUSE_INDEPENDENT.
1113
bfcfbfa0
MP
11142015-11-05 Marek Polacek <polacek@redhat.com>
1115
1116 PR c/68090
1117 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
1118 deal with pre-evaluation on invalid types.
1119
e01d41e5
JJ
11202015-11-05 Jakub Jelinek <jakub@redhat.com>
1121 Ilya Verbin <ilya.verbin@intel.com>
1122
1123 * c-parser.c: Include context.h and gimple-expr.h.
1124 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
1125 monotonic together with nonmonotonic.
1126 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
1127 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
1128 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
1129 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
1130 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
1131 expressions on combined target teams before the target.
1132 (c_parser_omp_declare_target): If decl has "omp declare target" or
1133 "omp declare target link" attribute, and cgraph or varpool node already
1134 exists, then set corresponding flags. Call c_finish_omp_clauses
1135 in the parenthesized extended-list syntax case.
1136 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
1137 declare target.
1138 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
1139 on OMP_CLAUSE_REDUCTION array sections.
1140 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
1141 into the constant offset, or for variable low-bound using
1142 POINTER_PLUS_EXPR. For structure element based array sections use
1143 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
1144 (c_finish_omp_clauses): Drop generic_field_head, structure
1145 elements are now always mapped even as array section bases,
1146 diagnose same var in data sharing and mapping clauses. Diagnose if
1147 linear step on declare simd is neither a constant nor a uniform
1148 parameter. Look through POINTER_PLUS_EXPR for array section
1149 reductions. Diagnose the same var or function appearing multiple
1150 times on the same directive. Fix up wording for the to clause if t
1151 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
1152 modifier on kinds other than dynamic or guided or nonmonotonic
1153 modifier together with ordered clause.
1154
4bf9e5a8
TS
11552015-11-03 Thomas Schwinge <thomas@codesourcery.com>
1156 Chung-Lin Tang <cltang@codesourcery.com>
1157
1158 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
1159
2adfab87
AM
11602015-10-29 Andrew MacLeod <amacleod@redhat.com>
1161
1162 * c-array-notation.c: Reorder #include's and remove duplicates.
1163 * c-aux-info.c: Likewise.
1164 * c-convert.c: Likewise.
1165 * c-decl.c: Likewise.
1166 * c-errors.c: Likewise.
1167 * c-lang.c: Likewise.
1168 * c-objc-common.c: Likewise.
1169 * c-parser.c: Likewise.
1170 * c-typeck.c: Likewise.
1171
e922069e
JW
11722015-10-26 Jim Wilson <jim.wilson@linaro.org>
1173
1174 PR debug/66068
1175 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1176 after calling build_qualified_type.
1177
765dd391
CP
11782015-10-27 Cesar Philippidis <cesar@codesourcery.com>
1179 Thomas Schwinge <thomas@codesourcery.com>
1180 James Norris <jnorris@codesourcery.com>
1181 Joseph Myers <joseph@codesourcery.com>
1182 Julian Brown <julian@codesourcery.com>
1183 Bernd Schmidt <bschmidt@redhat.com>
1184
1185 * c-parser.c (c_parser_oacc_shape_clause): New.
1186 (c_parser_oacc_simple_clause): New.
1187 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
1188 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
1189
88bae6f4
TS
11902015-10-27 Thomas Schwinge <thomas@codesourcery.com>
1191 James Norris <jnorris@codesourcery.com>
1192 Cesar Philippidis <cesar@codesourcery.com>
1193
1194 PR c/64765
1195 PR c/64880
1196 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
1197 parameters, and handle these. Adjust all users.
1198 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
1199 into...
1200 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
1201 all users.
1202 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
1203 declare functions.
1204 (c_finish_omp_construct): Declare function.
1205 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
1206 Merge functions into...
1207 (c_finish_omp_construct): ... this new function.
1208
a8fc2579
RB
12092015-10-22 Richard Biener <rguenther@suse.de>
1210
1211 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
1212 before folding a MINUS_EXPR.
1213
e9122ef6
MP
12142015-10-21 Marek Polacek <polacek@redhat.com>
1215
1216 PR c/68024
1217 * c-decl.c (start_function): Warn about vararg functions without
1218 a prototype.
1219
9f47c7e5
IE
12202015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
1221
1222 * c-typeck.c (build_conditional_expr): Use boolean vector
1223 type for vector comparison.
1224 (build_vec_cmp): New.
1225 (build_binary_op): Use build_vec_cmp for comparison.
1226
fa60eeb9
MP
12272015-10-20 Marek Polacek <polacek@redhat.com>
1228
1229 * c-parser.c (is_cilkplus_vector_p): Don't define here.
1230
2c7020eb
MP
12312015-10-20 Marek Polacek <polacek@redhat.com>
1232
1233 PR c/67964
1234 * c-parser.c (c_parser_attributes): Break out of the loop if the
1235 token after an attribute isn't a comma.
1236
d9a6bd32
JJ
12372015-10-13 Jakub Jelinek <jakub@redhat.com>
1238 Aldy Hernandez <aldyh@redhat.com>
1239
1240 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
1241 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
1242 (c_parser_omp_variable_list): Handle structure elements for
1243 map, to and from clauses. Handle array sections in reduction
1244 clause. Formatting fixes.
1245 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
1246 if clause modifiers.
1247 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1248 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1249 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
1250 c_parser_omp_clause_is_device_ptr): New functions.
1251 (c_parser_omp_clause_ordered): Parse optional parameter.
1252 (c_parser_omp_clause_reduction): Handle array reductions.
1253 (c_parser_omp_clause_schedule): Parse optional simd modifier.
1254 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
1255 functions.
1256 (c_parser_omp_clause_linear): Parse linear clause modifiers.
1257 (c_parser_omp_clause_depend_sink): New function.
1258 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
1259 (c_parser_omp_clause_map): Parse release/delete map kinds and
1260 optional always modifier.
1261 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
1262 and c_finish_omp_clauses callers.
1263 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
1264 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
1265 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
1266 (OMP_CRITICAL_CLAUSE_MASK): Define.
1267 (c_parser_omp_critical): Parse critical clauses.
1268 (c_parser_omp_for_loop): Handle doacross loops, adjust
1269 c_finish_omp_for and c_finish_omp_clauses callers.
1270 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
1271 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
1272 (OMP_FOR_CLAUSE_MASK): Add linear clause.
1273 (c_parser_omp_for): Disallow ordered clause when combined with
1274 distribute. Disallow linear clause when combined with distribute
1275 and not combined with simd.
1276 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
1277 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
1278 parse clauses and if depend clause is found, don't parse a body.
1279 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
1280 Allow target parallel without for after it.
1281 (OMP_TASK_CLAUSE_MASK): Add priority clause.
1282 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
1283 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
1284 invalid kinds.
1285 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
1286 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
1287 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
1288 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
1289 functions.
1290 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
1291 defaultmap and is_device_ptr clauses.
1292 (c_parser_omp_target): Parse target parallel and target simd. Set
1293 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
1294 and target exit data. Diagnose invalid map kinds.
1295 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
1296 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
1297 construct.
1298 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
1299 &omp_priv.
1300 (OMP_TASKLOOP_CLAUSE_MASK): Define.
1301 (c_parser_omp_taskloop): New function.
1302 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
1303 handle PRAGMA_OMP_TASKLOOP.
1304 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
1305 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
1306 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
1307 Add IS_OMP argument, handle structure element bases, diagnose
1308 bitfields, pass IS_OMP recursively, diagnose known zero length
1309 array sections in depend clauses, handle array sections in reduction
1310 clause, diagnose negative length even for pointers.
1311 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
1312 types, pass IS_OMP down to handle_omp_array_sections_1, handle
1313 array sections in reduction clause, set
1314 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
1315 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
1316 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
1317 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
1318
21ba0cea
MP
13192015-10-06 Marek Polacek <polacek@redhat.com>
1320
1321 * c-parser.c (c_parser_statement_after_labels): Use
1322 protected_set_expr_location.
1323 (c_parser_omp_clause_num_gangs): Likewise.
1324 (c_parser_omp_clause_num_threads): Likewise.
1325 (c_parser_omp_clause_num_workers): Likewise.
1326 (c_parser_omp_clause_vector_length): Likewise.
1327 (c_parser_omp_clause_num_teams): Likewise.
1328 (c_parser_omp_clause_thread_limit): Likewise.
1329 * c-typeck.c (build_c_cast): Likewise.
1330 (c_cast_expr): Likewise.
1331
624d31fe
RS
13322015-10-05 Richard Sandiford <richard.sandiford@arm.com>
1333
1334 * c-typeck.c (c_tree_equal): Use real_equal instead of
1335 REAL_VALUES_EQUAL.
1336
b8fd7909
JM
13372015-10-04 Jason Merrill <jason@redhat.com>
1338
1339 * c-parser.c (c_lex_one_token): Handle @synchronized.
1340 * c-decl.c (match_builtin_function_types): A declaration of a built-in
1341 can change whether the function is transaction_safe.
1342
1c7485af
MP
13432015-10-02 Marek Polacek <polacek@redhat.com>
1344
1345 PR c/67730
1346 * c-typeck.c (convert_for_assignment): Use the expansion point
1347 location throughout.
1348
3e3b8d63
MP
13492015-10-02 Marek Polacek <polacek@redhat.com>
1350
1351 PR c/64249
1352 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
1353 and pass it down to c_parser_if_statement.
1354 (c_parser_else_body): Add CHAIN parameter and pass it down to
1355 c_parser_statement_after_labels.
1356 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
1357 duplicated if-else-if conditions.
1358
aabef2de
MP
13592015-10-01 Marek Polacek <polacek@redhat.com>
1360
1361 * c-typeck.c (convert_for_assignment): Improve commentary.
1362
de8ddd5f
MP
13632015-09-30 Marek Polacek <polacek@redhat.com>
1364
1365 PR c/67730
1366 * c-typeck.c (c_finish_return): Use the expansion point location for
1367 certain "return with value" warnings.
1368
c4914de6
MLI
13692015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1370
1371 * c-parser.c (pragma_lex): Add loc argument.
1372
0e36f5c7
MP
13732015-09-15 Marek Polacek <polacek@redhat.com>
1374
1375 PR c/67580
1376 * c-decl.c (tag_exists_p): New function.
1377 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
1378 struct/union/enum keywords are missing.
1379 * c-tree.h (tag_exists_p): Declare.
1380
2f3bb934
MP
13812015-09-15 Marek Polacek <polacek@redhat.com>
1382
1383 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
1384 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
1385 Return NULL_TREE instead of 0.
1386 (lookup_name): Return NULL_TREE instead of 0.
1387 (lookup_name_in_scope): Likewise.
1388 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
1389 (parser_xref_tag): Use false instead of 0.
1390 (start_struct): Use true instead of 1.
1391 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
1392
aa256c4a
MP
13932015-09-14 Marek Polacek <polacek@redhat.com>
1394
1395 * c-typeck.c (set_nonincremental_init_from_string): Use
1396 HOST_WIDE_INT_M1U when shifting a negative value.
1397
dbb68221
MW
13982015-09-09 Mark Wielaard <mjw@redhat.com>
1399
1400 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
1401 parm against NULL.
1402
a8a098ac
JJ
14032015-09-10 Jakub Jelinek <jakub@redhat.com>
1404
1405 PR c/67502
1406 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
1407 into OMP_FOR_PRE_BODY rather than before the loop.
1408
f4b189d5
JJ
14092015-09-09 Jakub Jelinek <jakub@redhat.com>
1410
0bb99c11
JJ
1411 PR c/67501
1412 * c-parser.c (c_parser_oacc_all_clauses,
1413 c_parser_omp_all_clauses): Remove invalid clause from
1414 list of clauses even if parser->error is set.
1415
fce5e5e3
JJ
1416 PR c/67500
1417 * c-parser.c (c_parser_omp_clause_aligned,
1418 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
1419 test for errors.
1420 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
1421 error_mark_node.
1422
f4b189d5
JJ
1423 PR c/67495
1424 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
1425 instead of c_parser_unary_expression. If the result is !lvalue_p,
1426 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
1427
b2aaf235
MP
14282015-09-04 Marek Polacek <polacek@redhat.com>
1429
1430 PR sanitizer/67279
1431 * c-typeck.c (build_binary_op): Don't instrument static initializers.
1432
1807ffc1
MS
14332015-09-03 Martin Sebor <msebor@redhat.com>
1434
1435 PR c/66516
8b652e65
JJ
1436 * c-typeck.c (convert_arguments, parser_build_unary_op,
1437 build_conditional_expr, c_cast_expr, convert_for_assignment,
1438 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
1439 reject_gcc_builtin.
1440 (c_decl_implicit): Define.
1441
d04ff417
MP
14422015-09-02 Marek Polacek <polacek@redhat.com>
1443
1444 PR c/67432
1445 * c-parser.c (c_parser_enum_specifier): Give a better error for
1446 an empty enum.
1447
a79683d5
TS
14482015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1449
1450 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
1451
191a6b94
MP
14522015-08-12 Marek Polacek <polacek@redhat.com>
1453
1454 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
1455 LOC to it.
1456
420a9d9b
MP
14572015-08-03 Marek Polacek <polacek@redhat.com>
1458
1459 PR c/67088
1460 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
1461 Use it.
1462 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
1463
992118a1
PP
14642015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1465
1466 * c-parser.c (c_parser_if_body): Take token_indent_info
1467 argument. Call warn_for_misleading_indentation even when the
1468 body is a semicolon. Extract token_indent_infos corresponding
1469 to the guard, body and next tokens. Adjust call to
1470 warn_for_misleading_indentation accordingly.
1471 (c_parser_else_body): Likewise.
1472 (c_parser_if_statement): Likewise.
1473 (c_parser_while_statement): Likewise.
1474 (c_parser_for_statement): Likewise.
1475
46308474
LFSM
14762015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
1477 Manuel López-Ibáñez <manu@gcc.gnu.org>
1478
1479 * c-decl.c (get_parm_info): Remove static var. Update warning
1480 message.
1481
05b28fd6
MP
14822015-07-27 Marek Polacek <polacek@redhat.com>
1483
1484 PR c++/66555
1485 PR c/54979
1486 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
1487
451b5e48
MP
14882015-07-20 Marek Polacek <polacek@redhat.com>
1489
1490 PR c++/55095
1491 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
1492 (build_binary_op): Warn about left shift overflows.
1493
1916bcb5
AM
14942015-07-09 Andrew MacLeod <amacleod@redhat.com>
1495
1496 * c-array-notation.c: Adjust includes for flags.h changes.
1497 * c-objc-common.c: Likewise.
1498
c7131fb2
AM
14992015-07-07 Andrew MacLeod <amacleod@redhat.com>
1500
1501 * c-array-notation.c: Adjust includes.
1502 * c-aux-info.c: Likewise.
1503 * c-convert.c: Likewise.
1504 * c-decl.c: Likewise.
1505 * c-errors.c: Likewise.
1506 * c-lang.c: Likewise.
1507 * c-objc-common.c: Likewise.
1508 * c-parser.c: Likewise.
1509 * c-typeck.c: Likewise.
1510
da2e71c9
MLI
15112015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1512
1513 PR fortran/66605
1514 * c-decl.c (finish_function): Call do_warn_unused_parameter.
1515
b155cfd9
MP
15162015-06-29 Marek Polacek <polacek@redhat.com>
1517
1518 PR c/66322
1519 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
1520 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
1521 about -Wswitch-bool here.
1522 (do_case): Update c_add_case_label call.
1523 (c_finish_case): Update c_do_switch_warnings call.
1524
31521951
MP
15252015-06-27 Marek Polacek <polacek@redhat.com>
1526
1527 * c-typeck.c: Use VECTOR_TYPE_P throughout.
1528
22d03525
MP
15292015-06-26 Marek Polacek <polacek@redhat.com>
1530
1531 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1532 INDIRECT_REF_P.
1533 * c-typeck.c (array_to_pointer_conversion): Likewise.
1534 (build_unary_op): Likewise.
1535 (c_finish_return): Likewise.
1536
f0889939
AM
15372015-06-25 Andrew MacLeod <amacleod@redhat.com>
1538
1539 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
1540 * c-parser.c: Likewise.
1541
8d67ee55
RS
15422015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1543
1544 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
1545 instead of pointer_hash.
1546 (detect_field_duplicates): Likewise.
1547
0ae9bd27
MP
15482015-06-25 Marek Polacek <polacek@redhat.com>
1549
1550 * c-array-notation.c: Use VAR_P throughout.
1551 * c-decl.c: Likewise.
1552 * c-objc-common.c: Likewise.
1553 * c-parser.c: Likewise.
1554 * c-typeck.c: Likewise.
1555
62f9079a
MP
15562015-06-25 Marek Polacek <polacek@redhat.com>
1557
1558 * c-decl.c: Use is_global_var throughout.
1559 * c-parser.c: Likewise.
1560 * c-typeck.c: Likewise.
1561
abb226c9
AM
15622015-06-17 Andrew MacLeod <amacleod@redhat.com>
1563
1564 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
1565 * c-aux-info.c: Likewise.
1566 * c-convert.c: Likewise.
1567 * c-decl.c: Likewise.
1568 * c-errors.c: Likewise.
1569 * c-lang.c: Likewise.
1570 * c-objc-common.c: Likewise.
1571 * c-parser.c: Likewise.
1572 * c-typeck.c: Likewise.
1573
8cbababc
JH
15742015-06-11 Jan Hubicka <hubicka@ucw.cz>
1575
1576 PR middle-end/66325
1577 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
1578 variants.
1579
a0349665
PMR
15802015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
1581
1582 * c-decl.c (pop_scope): Register the main translation unit
1583 through the new debug hook.
1584
13fdf2e2
AM
15852015-06-08 Andrew MacLeod <amacleod@redhat.com>
1586
1587 * c-array-notation.c : Adjust include files.
1588 * c-aux-info.c : Likewise.
1589 * c-convert.c : Likewise.
1590 * c-decl.c : Likewise.
1591 * c-errors.c : Likewise.
1592 * c-lang.c : Likewise.
1593 * c-lang.h : Likewise.
1594 * c-objc-common.c : Likewise.
1595 * c-parser.c : Likewise.
1596 * c-typeck.c : Likewise.
1597
d7438551
AH
15982015-06-05 Aldy Hernandez <aldyh@redhat.com>
1599
1600 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
1601 immediately clobber it.
1602 (c_write_global_declarations_1): Remove call to
1603 check_global_declaration_1.
1604 (c_write_global_declarations_2): Remove.
1605 (c_write_final_cleanups): Rename from c_write_global_declarations.
1606 Remove call to finalize_compilation_unit.
1607 Remove calls to debugging hooks.
1608 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
1609 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
1610 * c-tree.h: Remove c_write_global_declarations.
1611
ecb9f223
AM
16122015-06-04 Andrew MacLeod <amacleod@redhat.com>
1613
1614 * c-array-notation.c: Adjust includes for restructured coretypes.h.
1615 * c-aux-info.c: Likewise.
1616 * c-convert.c: Likewise.
1617 * c-decl.c: Likewise.
1618 * c-errors.c: Likewise.
1619 * c-lang.c: Likewise.
1620 * c-objc-common.c: Likewise.
1621 * c-parser.c: Likewise.
1622 * c-typeck.c: Likewise.
1623
9482b620
MP
16242015-06-04 Marek Polacek <polacek@redhat.com>
1625
1626 PR c/66341
1627 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
1628 it is a lvalue.
1629
bc51ace3
PK
16302015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1631
1632 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
1633 Warn for empty struct.
1634 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
1635
ea5b45b6
AT
16362015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
1637
1638 * c-decl.c (start_function): Call plugin before parsing.
1639 (finish_function): Call plugin after parsing.
1640
c2d47482
PK
16412015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1642
1643 PR c/49551
1644 * c-decl.c (merge_decls): Merge DECL_COMMON.
1645
a95492ab
JW
16462015-05-22 Jim Wilson <jim.wilson@linaro.org>
1647
1648 * Make-lang.in (check_gcc_pallelize): Define.
1649
fd5c817a
MP
16502015-05-22 Marek Polacek <polacek@redhat.com>
1651
1652 PR c/47043
1653 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
1654 attributes.
1655
c7b70a3c
MP
16562015-05-21 Marek Polacek <polacek@redhat.com>
1657
1658 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
1659 DECL_BUILT_IN.
1660
21b634ae
MP
16612015-05-20 Marek Polacek <polacek@redhat.com>
1662
1663 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
1664 * c-typeck.c: Likewise.
1665
296a8c2f
MP
16662015-05-19 Marek Polacek <polacek@redhat.com>
1667
1668 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
1669
41b37d5e
JJ
16702015-05-19 Jakub Jelinek <jakub@redhat.com>
1671
1672 PR middle-end/66199
1673 * c-parser.c (c_parser_omp_for_loop): Don't add
1674 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1675 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1676 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1677 constructs.
1678
fab27f52
MM
16792015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
1680
1681 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 1682 swaps.
fab27f52 1683
40de31cf
MLI
16842015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
1685
1686 PR fortran/44054
1687 * c-objc-common.c (c_tree_printer): Replace locus pointer with
1688 accessor function.
1689
3aa3c9fc
MP
16902015-05-14 Marek Polacek <polacek@redhat.com>
1691
1692 PR c/66066
1693 PR c/66127
1694 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
1695 rather than with 0.
1696
c3388e62
DM
16972015-05-12 David Malcolm <dmalcolm@redhat.com>
1698
1699 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
1700 to add a call to warn_for_misleading_indentation.
1701 (c_parser_else_body): Likewise, adding param "else_loc".
1702 (c_parser_if_statement): Check for misleading indentation.
1703 (c_parser_while_statement): Likewise.
1704 (c_parser_for_statement): Likewise.
1705
755e528f
MP
17062015-05-08 Marek Polacek <polacek@redhat.com>
1707
1708 PR c/64918
1709 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
1710 (output_init_element): Likewise.
1711
0173bd2a
MP
17122015-05-07 Marek Polacek <polacek@redhat.com>
1713
1714 PR c/65179
1715 * c-typeck.c (build_binary_op): Warn when left shifting a negative
1716 value.
1717
9babc352
MP
17182015-04-30 Marek Polacek <polacek@redhat.com>
1719
1720 * c-typeck.c (set_init_label): Call error_at instead of error and
1721 pass LOC to it.
1722
ac9f18db
MP
1723 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
1724 the type of a decl.
1725
ec3fba51
MP
1726 * c-typeck.c (c_build_va_arg): Clarify the error message.
1727
b811915d
TS
17282015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1729
1730 * c-parser.c (c_parser_oacc_enter_exit_data): Use
1731 OMP_STANDALONE_CLAUSES.
1732
f3075008
MP
17332015-04-28 Marek Polacek <polacek@redhat.com>
1734
1735 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
1736
4e81b788
MP
17372015-04-28 Marek Polacek <polacek@redhat.com>
1738
1739 PR c/65901
1740 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
1741
6c1db78e
MP
17422015-04-25 Marek Polacek <polacek@redhat.com>
1743
1744 PR c/52085
1745 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
1746 attribute.
1747
5c4abbb8
MP
17482015-04-23 Marek Polacek <polacek@redhat.com>
1749
1750 PR c/65345
1751 * c-decl.c (set_labels_context_r): New function.
1752 (store_parm_decls): Call it via walk_tree_without_duplicates.
1753 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
1754 instead of create_tmp_var. Build TARGET_EXPR instead of
1755 COMPOUND_EXPR.
1756 (build_atomic_assign): Use create_tmp_var_raw instead of
1757 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
1758
06aca1d5
IV
17592015-04-20 Ilya Verbin <ilya.verbin@intel.com>
1760
1761 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
1762 (c_parser_omp_target_update): Add missed %> to error_at ().
1763
8fba1830
BRF
17642015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1765
1766 PR target/55143
1767 * c-decl.c (c_default_pointer_mode): Remove definition.
1768 * c-tree.h (c_default_pointer_mode): Remove declaration.
1769
62021f64
TB
17702015-03-27 Tobias Burnus <burnus@net-b.de>
1771
1772 PR c/65586
1773 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
1774 error out.
1775 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
1776 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
1777 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
1778
9b65e171
JJ
17792015-03-19 Jakub Jelinek <jakub@redhat.com>
1780
1781 * c-decl.c (c_decl_attributes): Also add "omp declare target"
1782 attribute for DECL_EXTERNAL VAR_DECLs.
1783
17958621
JJ
17842015-03-11 Jakub Jelinek <jakub@redhat.com>
1785
1786 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
1787 argument.
1788
7ccb1a11
JJ
17892015-03-10 Jakub Jelinek <jakub@redhat.com>
1790
1791 PR c/65120
1792 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
1793 before preparing arguments to warn_logical_not_parentheses.
1794
01177669
JJ
17952015-03-09 Jakub Jelinek <jakub@redhat.com>
1796
1797 PR c/65120
1798 * c-typeck.c (parser_build_binary_op): Don't warn for
1799 !!x == y or !b == y where b is _Bool.
1800
802ac282
MP
18012015-03-09 Marek Polacek <polacek@redhat.com>
1802
1803 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
1804 * c-decl.c (grokdeclarator): Likewise.
1805 * c-typeck.c (build_binary_op): Likewise.
1806
e5165b60
MP
18072015-02-27 Marek Polacek <polacek@redhat.com>
1808
1809 PR c/65228
1810 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
1811
065d214c
MP
18122015-02-14 Marek Polacek <polacek@redhat.com>
1813
1814 PR c/64768
1815 * c-decl.c (grokdeclarator): Set the range of a flexible array member
1816 declared through a typedef name.
1817
e5d9235b
MP
18182015-02-13 Marek Polacek <polacek@redhat.com>
1819
1820 PR c/65050
1821 * c-decl.c (grokdeclarator): Print also the type when giving
1822 the error message about array's incomplete element type.
1823
fa01ffcc
JJ
18242015-02-11 Jakub Jelinek <jakub@redhat.com>
1825
1826 PR c/64824
1827 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
1828 check in the POP macro.
1829
c3e38a03
MP
18302015-02-09 Marek Polacek <polacek@redhat.com>
1831
1832 PR c/64856
1833 * c-typeck.c (process_init_element): Don't always wrap
1834 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
1835 initializing a range of elements.
1836
4886ec8e
JJ
18372015-02-04 Jakub Jelinek <jakub@redhat.com>
1838
1839 PR c/64824
1840 PR c/64868
1841 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
1842
c3e38a03 18432015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
1844
1845 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
1846 processing enum declaration.
1847
7b33f0c8
MP
18482015-01-29 Marek Polacek <polacek@redhat.com>
1849
1850 PR c/64709
1851 * c-typeck.c (pop_init_level): If constructor_elements has
1852 exactly one element with integer_zerop value, set constructor_zeroinit
1853 to 1. Remove braces around warning_init call.
1854
dea63e49
JJ
18552015-01-27 Jakub Jelinek <jakub@redhat.com>
1856
1857 PR c/64766
1858 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
1859 of FUNCTION_DECLs with error_mark_node.
1860
d38f7dce
JJ
18612015-01-26 Jakub Jelinek <jakub@redhat.com>
1862
1863 PR c/64778
1864 * c-typeck.c (convert_arguments): Return -1 if there are
1865 error_args, even if we've diagnosed too many arguments.
1866
cbf5d0e7
RB
18672015-01-21 Richard Biener <rguenther@suse.de>
1868
1869 PR middle-end/64313
1870 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
1871 for builtins the user declared correctly.
1872
41dbbb37
TS
18732015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1874 Bernd Schmidt <bernds@codesourcery.com>
1875 Cesar Philippidis <cesar@codesourcery.com>
1876 James Norris <jnorris@codesourcery.com>
1877 Jakub Jelinek <jakub@redhat.com>
1878 Ilmir Usmanov <i.usmanov@samsung.com>
1879
1880 * c-parser.c: Include "gomp-constants.h".
1881 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1882 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1883 Use OMP_CLAUSE_SET_MAP_KIND.
1884 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
1885 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
1886 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
1887 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
1888 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
1889 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
1890 "copyout", "create", "delete", "deviceptr", "gang", "host",
1891 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
1892 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1893 "present_or_create", "pcreate", "seq", "self", "vector",
1894 "vector_length", "wait", "worker".
1895 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1896 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
1897 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1898 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1899 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
1900 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
1901 (c_parser_oacc_data_clause_deviceptr)
1902 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
1903 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
1904 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
1905 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
1906 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
1907 (c_parser_oacc_parallel, c_parser_oacc_update)
1908 (c_parser_oacc_wait): New functions.
1909 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
1910 (c_finish_oacc_data): New prototypes.
1911 * c-typeck.c: Include "gomp-constants.h".
1912 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1913 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1914 OMP_CLAUSE_SET_MAP_KIND.
1915 (c_finish_oacc_parallel, c_finish_oacc_kernels)
1916 (c_finish_oacc_data): New functions.
1917 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
1918 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
1919 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
1920 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
1921 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
1922 GOMP_MAP_FORCE_DEVICEPTR.
1923
adfac8df
JJ
19242015-01-09 Michael Collison <michael.collison@linaro.org>
1925
1926 * c-array-notation.c: Include hash-set.h, machmode.h,
1927 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1928 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
1929 * c-aux-info.c: Ditto.
1930 * c-convert.c: Ditto.
1931 * c-decl.c: Ditto.
1932 * c-errors.c: Ditto.
1933 * c-lang.c: Dittoxs.
1934 * c-objc-common.c: Ditto.
1935 * c-parser.c: Ditto.
1936 * c-typeck.c: Include hash-set.h, machmode.h,
1937 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1938 fold-const.h, wide-int.h, inchash.h, real.h and
1939 fixed-value.h due to flattening of tree.h.
1940
2cc901dc
MP
19412015-01-07 Marek Polacek <polacek@redhat.com>
1942
1943 PR c/64417
1944 * c-typeck.c (process_init_element): Disallow initialization of
1945 a flexible array member with a string constant if the structure
1946 is in an array.
1947
5624e564
JJ
19482015-01-05 Jakub Jelinek <jakub@redhat.com>
1949
e5341100
JJ
1950 PR sanitizer/64344
1951 * c-typeck.c (convert_for_assignment, c_finish_return): For
1952 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
1953 types also set in_late_binary_op around convert call.
1954 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
1955 to integral type casts, if not in_late_binary_op, pass c_fully_fold
1956 result on expr as last argument to ubsan_instrument_float_cast,
1957 if in_late_binary_op, don't use c_save_expr but save_expr.
1958
5624e564
JJ
1959 Update copyright years.
1960
5bd012f8
MP
19612015-01-05 Marek Polacek <polacek@redhat.com>
1962
1963 PR c/64423
1964 * c-typeck.c (build_array_ref): Pass loc down to
1965 warn_array_subscript_with_type_char.
1966
768952be
MU
19672014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
1968
1969 * c-typeck.c: New behavious for pointers to arrays with qualifiers
1970 (common-pointer-type): For pointers to arrays take qualifiers from
1971 element type.
1972 (build_conditional_expr): Add warnings for lost qualifiers.
1973 (comp-target-types): Allow pointers to arrays with different qualifiers.
1974 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
1975 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
1976 to PEDWARN_FOR_QUALIFIERS.
1977
8f94a8c4
JJ
19782014-12-17 Jakub Jelinek <jakub@redhat.com>
1979
1980 PR sanitizer/64289
1981 * c-convert.c: Include ubsan.h.
1982 (convert): For real -> integral casts and
1983 -fsanitize=float-cast-overflow don't call convert_to_integer, but
1984 instead instrument the float cast directly.
1985
b731b390
JJ
19862014-11-29 Jakub Jelinek <jakub@redhat.com>
1987
1988 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
1989 c_finish_stmt_expr): Remove NULL last argument from
1990 create_tmp_var_raw and create_tmp_var calls.
1991 * c-array-notation.c (fix_builtin_array_notation_fn,
1992 build_array_notation_expr, fix_conditional_array_notations_1,
1993 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
1994
541e35a6
MP
19952014-11-28 Marek Polacek <polacek@redhat.com>
1996
1997 PR c/63862
1998 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
1999 convert the right operand to integer type.
2000
b286be94
MP
20012014-11-25 Marek Polacek <polacek@redhat.com>
2002
2003 PR c/63877
2004 * c-decl.c (start_function): Disable -Wmissing-declarations warning
2005 for inline functions.
2006
aa7da51a
JJ
20072014-11-21 Jakub Jelinek <jakub@redhat.com>
2008
2009 PR target/63764
2010 * c-typeck.c (build_array_ref): Adjust
2011 convert_vector_to_pointer_for_subscript caller. If it returns true,
2012 call non_lvalue_loc on the result.
2013
d876207f
RB
20142014-11-11 Richard Biener <rguenther@suse.de>
2015
2016 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
2017 to true.
2018
e5e44252
AK
20192014-11-10 Andi Kleen <ak@linux.intel.com>
2020
2021 PR c/60804
2022 * c-parser.c (c_parser_statement_after_labels): Call
2023 check_no_cilk.
2024 (c_parser_if_statement): Dito.
2025 (c_parser_switch_statement): Dito.
2026 (c_parser_while_statement): Dito.
2027 (c_parser_do_statement): Dito.
2028 (c_parser_for_statement): Dito.
2029 * c-typeck.c (c_finish_loop): Dito.
2030
13c21655
PC
20312014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
2032
2033 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
2034 OPT_Wshift_count_overflow in the warnings.
2035
2d51fcef
MP
20362014-10-30 Marek Polacek <polacek@redhat.com>
2037
2038 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
2039 print the stripped version as well, if they're not the same.
2040
ef4bddc2
RS
20412014-10-29 Richard Sandiford <richard.sandiford@arm.com>
2042
2043 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
2044 machine_mode.
2045
c582198b
AM
20462014-10-28 Andrew MacLeod <amacleod@redhat.com>
2047
2048 * c-decl.c: Adjust include files.
2049 * c-parser.c: Ditto.
2050
ddc8de03
PM
20512014-10-27 Phil Muldoon <pmuldoon@redhat.com>
2052 Tom Tromey <tromey@redhat.com>
2053
2054 * c-tree.h (enum c_oracle_request): New.
2055 (c_binding_oracle_function): New typedef.
2056 (c_binding_oracle, c_pushtag, c_bind): Declare.
2057 * c-decl.c (c_binding_oracle): New global.
2058 (I_SYMBOL_CHECKED): New macro.
2059 (i_symbol_binding): New function.
2060 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
2061 (I_TAG_CHECKED): New macro.
2062 (i_tag_binding): New function.
2063 (I_TAG_BINDING, I_TAG_DECL): Redefine.
2064 (I_LABEL_CHECKED): New macro.
2065 (i_label_binding): New function.
2066 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
2067 (c_print_identifier): Save and restore c_binding_oracle.
2068 (c_pushtag, c_bind): New functions.
2069
60393bbc
AM
20702014-10-27 Andrew MacLeod <amacleod@redhat.com>
2071
2072 * c-typeck.c: Adjust include files.
2073
d723bb7c
MLI
20742014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
2075
2076 PR c++/53061
2077 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
2078 initialization here...
2079 (c_initialize_diagnostics): ... but here. Set defaults after
2080 building pretty-printer.
2081
1bc5a451
MP
20822014-10-23 Marek Polacek <polacek@redhat.com>
2083
2084 PR c/63626
2085 * c-decl.c (pop_scope): Don't print warning in external_scope.
2086
4435bb92
MP
20872014-10-19 Marek Polacek <polacek@redhat.com>
2088
2089 PR c/63567
2090 * c-typeck.c (output_init_element): Allow initializing objects with
2091 static storage duration with compound literals even in C99 and add
2092 pedwarn for it.
2093
7278465e
MP
20942014-10-17 Marek Polacek <polacek@redhat.com>
2095
2096 PR c/63567
2097 * c-typeck.c (digest_init): Allow initializing objects with static
2098 storage duration with compound literals even in C99 and add pedwarn
2099 for it.
2100
d9b7be2e
MP
21012014-10-17 Marek Polacek <polacek@redhat.com>
2102
2103 PR c/63543
2104 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
2105 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
2106 error multiple times. Print the type.
2107
f406ae1f
MP
21082014-10-17 Marek Polacek <polacek@redhat.com>
2109
2110 PR c/63549
2111 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
2112 type.
2113
92574c7c
MP
21142014-10-17 Marek Polacek <polacek@redhat.com>
2115
2116 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
2117 (start_function): Use OPT_Wimplicit_int instead of 0.
2118 (store_parm_decls_oldstyle): Likewise.
2119
1bc4a978
MT
21202014-10-17 Alan Modra <amodra@gmail.com>
2121
2122 PR middle-end/61848
2123 * c-decl.c (merge_decls): Don't merge section name or tls model
2124 to newdecl symtab node, instead merge to olddecl. Override
2125 existing olddecl section name. Set tls_model for all thread-local
2126 vars, not just OMP thread-private ones. Remove incorrect comment.
2127
83685514
AM
21282014-10-16 Andrew MacLeod <amacleod@redhat.com>
2129
2130 * c-decl.c: Adjust include files.
2131
78a7c317
DD
21322014-10-14 DJ Delorie <dj@redhat.com>
2133
2134 * c-parser.c (c_parse_init): Add RID entries for each __intN.
2135 (c_token_starts_typename): Check all __intN, not just __int128.
2136 (c_token_starts_declspecs): Likewise.
2137 (c_parser_declspecs): Likewise.
2138 (c_parser_attribute_any_word): Likewise.
2139 (c_parser_objc_selector): Likewise.
2140 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
2141 (struct c_declspecs): Add int_n_idx field to record *which* __intN
2142 is specified.
2143 * c-decl.c (declspecs_add_type): Check for all __intN, not just
2144 __int128.
2145 (finish_declspecs): Likewise.
2146
74d98c1e
AB
21472014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
2148
2149 * c-parser.c (c_parser_all_labels): New function to replace
2150 the duplicate code.
2151 (c_parser_statement): Call the new function.
2152
84937de2
MP
21532014-10-09 Marek Polacek <polacek@redhat.com>
2154
2155 PR c/63480
2156 * c-typeck.c (pop_init_level): Don't warn about initializing
2157 with { }.
2158
0382aaa0
MP
21592014-10-07 Marek Polacek <polacek@redhat.com>
2160
2161 PR c/59717
2162 * c-decl.c (header_for_builtin_fn): New function.
2163 (implicitly_declare): Suggest which header to include.
2164
7a0ca710
MP
21652014-10-07 Marek Polacek <polacek@redhat.com>
2166
2167 * c-convert.c (convert): Use error_operand_p.
2168 * c-typeck.c (require_complete_type): Likewise.
2169 (really_atomic_lvalue): Likewise.
2170 (digest_init): Likewise.
2171 (handle_omp_array_sections_1): Likewise.
2172
6bc8a126
MP
21732014-10-03 Marek Polacek <polacek@redhat.com>
2174
2175 PR c/63453
2176 * c-decl.c (pop_scope): Don't warn about "inline function declared
2177 but never defined" for functions marked with gnu_inline attribute.
2178
d90c0a59
JJ
21792014-09-25 Jakub Jelinek <jakub@redhat.com>
2180
2181 PR c++/63249
2182 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
2183 on low_bound and length.
2184
083e891e
MP
21852014-09-24 Marek Polacek <polacek@redhat.com>
2186
2187 PR c/61405
2188 PR c/53874
2189 * c-parser.c: Don't define CPP_KEYWORD.
2190 (c_parser_switch_statement): Pass original type to c_finish_case.
2191 * c-tree.h (c_finish_case): Update declaration.
2192 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
2193 conditionally to c_do_switch_warnings.
2194
8d95fe25
MP
21952014-09-03 Marek Polacek <polacek@redhat.com>
2196
2197 PR c/62024
2198 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
2199 conversions.
2200
9a771876
JJ
22012014-09-02 Jakub Jelinek <jakub@redhat.com>
2202 Balaji V. Iyer <balaji.v.iyer@intel.com>
2203 Igor Zamyatin <igor.zamyatin@intel.com>
2204
2205 * c-parser.c (c_parser_cilk_for): New function.
2206 (c_parser_cilk_grainsize): Likewise.
2207 (c_get_temp_regvar): Likewise.
2208 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
2209 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
2210 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
2211 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
2212 case.
2213
b7679d96
CG
22142014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
2215
2216 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
2217 with using HOST_WIDE_INT without truncation to 'int'
2218
59ea0364
MP
22192014-08-22 Marek Polacek <polacek@redhat.com>
2220
2221 PR c++/62199
2222 * c-typeck.c (parser_build_binary_op): Adjust call to
2223 warn_logical_not_parentheses.
2224
671a475e
IZ
22252014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
2226
2227 PR other/62008
2228 * c-parser.c (c_parser_array_notation): Check for correct
2229 type of an array added.
2230
04159acf
MP
22312014-08-19 Marek Polacek <polacek@redhat.com>
2232
2233 PR c++/62153
2234 * c-typeck.c (build_binary_op): If either operand of a comparison
2235 is a boolean expression, call maybe_warn_bool_compare.
2236
c77935ee
PP
22372014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
2238
2239 PR c/45584
2240 * c-typeck.c (build_c_cast): Do a conversion even when the
2241 TYPE_MAIN_VARIANTs are the same.
2242
35aff4fb
MP
22432014-08-19 Marek Polacek <polacek@redhat.com>
2244
2245 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
2246 pedwarn_c99 instead of pedwarn.
2247 (grokfield): Likewise.
2248 (warn_defaults_to): New function.
2249 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
2250 Unconditionally call pedwarn_c99 instead of pedwarn.
2251 (start_function): Call warn_defaults_to instead of pedwarn_c99.
2252 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
2253 check flag_isoc11 before.
2254 * c-errors.c (pedwarn_c99): Change the return type to bool.
2255 Handle -Wc99-c11-compat.
2256 * c-parser.c (disable_extension_diagnostics): Handle
2257 warn_c99_c11_compat.
2258 (restore_extension_diagnostics): Likewise.
2259 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
2260 instead of pedwarn, don't check flag_isoc11 before.
2261 (c_parser_declspecs): Likewise.
2262 (c_parser_alignas_specifier): Likewise.
2263 (c_parser_alignof_expression): Likewise.
2264 (c_parser_generic_selection): Likewise.
2265 * c-tree.h (pedwarn_c99): Update declaration.
2266 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
2267 of pedwarn_c99.
2268
177cce46
MP
22692014-08-19 Marek Polacek <polacek@redhat.com>
2270
2271 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
2272 to pedwarn_c90.
2273 * c-errors.c: Include "opts.h".
2274 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
2275 * c-parser.c (disable_extension_diagnostics): Handle negative value
2276 of warn_c90_c99_compat, too.
2277 (restore_extension_diagnostics): Likewise.
2278 (c_parser_compound_statement_nostart): Pass
2279 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
2280
6dc99c33
MP
22812014-08-12 Marek Polacek <polacek@redhat.com>
2282
2283 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
2284 Add pedwarn.
2285 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
2286 Likewise.
2287 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
2288
f3bede71
MP
22892014-08-10 Marek Polacek <polacek@redhat.com>
2290
2291 PR c/51849
2292 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
2293 Call pedwarn_c90 instead of pedwarn.
2294 (check_bitfield_type_and_width): Likewise.
2295 (declspecs_add_qual): Likewise.
2296 (declspecs_add_type): Likewise.
2297 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
2298 Adjust to only call pedwarn_c90.
2299 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
2300 pedwarn_c90 instead of pedwarn.
2301 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
2302 * c-parser.c (disable_extension_diagnostics): Handle
2303 warn_c90_c99_compat.
2304 (restore_extension_diagnostics): Likewise.
2305 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
2306 pedwarn_c90 instead of pedwarn.
2307 (c_parser_initelt): Likewise.
2308 (c_parser_postfix_expression): Likewise.
2309 (c_parser_postfix_expression_after_paren_type): Likewise.
2310 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
2311 * c-tree.h: Fix formatting.
2312 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
2313 pedwarn_c90 instead of pedwarn.
2314
9f25a338
TS
23152014-08-07 Trevor Saunders <tsaunders@mozilla.com>
2316
2317 * c-typeck.c: Remove include of pointer-set.h.
2318
044331a8
MP
23192014-08-07 Marek Polacek <polacek@redhat.com>
2320
2321 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
2322
b787e7a2
TS
23232014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2324
2325 * c-typeck.c: Use hash_map instead of pointer_map.
2326
6e2830c3
TS
23272014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2328
2329 * c-decl.c: Use hash_set instead of pointer_set.
2330
a7ee52fb
IZ
23312014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
2332
2333 PR middle-end/61455
2334 * c-array-notation.c (expand_array_notations): Handling
2335 of DECL_EXPR added.
2336
b4dfdc11
MG
23372014-07-31 Marc Glisse <marc.glisse@inria.fr>
2338
2339 PR c++/60517
2340 * c-typeck.c (c_finish_return): Return 0 instead of the address of
2341 a local variable.
2342
976d5a22
TT
23432014-07-30 Tom Tromey <tromey@redhat.com>
2344
2345 * c-typeck.c (struct constructor_stack) <designator_depth>: New
2346 field.
2347 (really_start_incremental_init, push_init_level): Initialize
2348 designator_depth.
2349 (pop_init_level): Set global designator_depth.
2350 (process_init_element): Check for designated_init attribute.
2351
30281de2
MP
23522014-07-20 Marek Polacek <polacek@redhat.com>
2353
2354 PR c/61852
2355 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
2356 (implicitly_declare): Pass location to implicit_decl_warning.
2357
b108f48f
JJ
23582014-07-14 Jakub Jelinek <jakub@redhat.com>
2359
2360 PR middle-end/61294
2361 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
2362 If non-NULL, call c_parser_check_literal_zero.
2363 (c_parser_check_literal_zero): New function.
2364 (c_parser_postfix_expression_after_primary): Adjust
2365 c_parser_expr_list caller, handle -Wmemset-transposed-args.
2366
773ec47f
MP
23672014-07-06 Marek Polacek <polacek@redhat.com>
2368
2369 PR c/6940
2370 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
2371 * c-tree.h (C_ARRAY_PARAMETER): Define.
2372 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
2373 function parameter.
2374
22e1cf1c
JH
23752014-07-02 Jan Hubicka <hubicka@ucw.cz>
2376 Chen Gang <gang.chen.5i5j@gmail.com>
2377
2378 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
2379 releasing symbol.
2380
52ec0ea3
MP
23812014-07-01 Marek Polacek <polacek@redhat.com>
2382
2383 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
2384 instead of 0 to WARN_FOR_ASSIGNMENT.
2385
d5c3d343
MP
23862014-07-01 Marek Polacek <polacek@redhat.com>
2387
2388 PR c/58286
2389 * c-typeck.c (convert_for_assignment): Pass
2390 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
2391
6a7253a4
MP
23922014-06-30 Marek Polacek <polacek@redhat.com>
2393
2394 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
2395 has no_sanitize_undefined attribute.
2396
5e88a8f4
IZ
23972014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
2398
2399 PR middle-end/57541
2400 * c-array-notation.c (fix_builtin_array_notation_fn):
2401 Check for 0 arguments in builtin call. Check that bultin argument is
2402 correct.
2403 * c-parser.c (c_parser_array_notation): Check for incorrect initial
2404 index.
2405
9698b078
SH
24062014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
2407
2408 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
2409 qualifiers in __auto_type for atomic types.
2410 (c_parser_typeof_specifier): Discard all type qualifiers in
2411 __typeof__ for atomic types.
2412
6e07c515
MP
24132014-06-25 Marek Polacek <polacek@redhat.com>
2414
2415 PR c/61162
2416 * c-parser.c (c_parser_statement_after_labels): Pass the location of
2417 the return expression to c_finish_return.
2418
da6f124d
JJ
24192014-06-25 Jakub Jelinek <jakub@redhat.com>
2420
2421 * c-typeck.c (c_finish_omp_clauses): Make sure
2422 OMP_CLAUSE_LINEAR_STEP has correct type.
2423
c203e8a7
TS
24242014-06-24 Trevor Saunders <tsaunders@mozilla.com>
2425
2426 * c-decl.c: Adjust.
2427
56ad0e38
JJ
24282014-06-24 Jakub Jelinek <jakub@redhat.com>
2429
2430 * c-parser.c (c_parser_omp_for_loop): For
2431 #pragma omp parallel for simd move lastprivate clause from parallel
2432 to for rather than simd.
2433
47c2554f
MP
24342014-06-23 Marek Polacek <polacek@redhat.com>
2435
2436 * c-typeck.c (parser_build_binary_op): Don't call
2437 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
2438
56363ffd
JH
24392014-06-15 Jan Hubicka <hubicka@ucw.cz>
2440
2441 * c-parser.c (c_parser_omp_threadprivate): Likewise.
2442 * c-decl.c (merge_decls): Likewise.
2443
d7ff7ae5
MP
24442014-06-09 Marek Polacek <polacek@redhat.com>
2445
2446 PR c/36446
2447 * c-typeck.c (error_init): Call inform instead of error_at.
2448 (pedwarn_init): Call inform instead of pedwarn.
2449 (warning_init): Call inform instead of warning_at.
2450
24d047a3
JH
24512014-06-07 Jan Hubicka <hubicka@ucw.cz>
2452
2453 * c-decl.c (merge_decls): Use set_decl_section_name.
2454 (duplicate_decls): Remove node if it exists.
2455
9bac5cbb
G
24562014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
2457
2458 PR c/53119
2459 * c-typeck.c (push_init_level, process_init_element,
2460 pop_init_level): Correct check for zero initialization, move
2461 missing brace warning to respect zero initialization.
2462
8ffcdea8
MP
24632014-06-05 Marek Polacek <polacek@redhat.com>
2464
2465 PR c/56724
2466 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
2467
742938c9
MP
24682014-06-05 Marek Polacek <polacek@redhat.com>
2469
2470 PR c/49706
2471 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
2472 on the left hand side operand of a comparison.
2473
6447c55d
MP
24742014-06-05 Marek Polacek <polacek@redhat.com>
2475
2476 PR c/48062
2477 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
2478 Print note only if the warning was printed.
2479
9dc7743c
IZ
24802014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
2481
2482 PR c/58942
2483 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
2484 with a pointer.
2485
fedfecef
MP
24862014-06-03 Marek Polacek <polacek@redhat.com>
2487
2488 PR c/60439
2489 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
2490 c_start_case.
2491 * c-tree.h (c_start_case): Update.
2492 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
2493 switch condition has boolean value.
2494
9b2b7279
AM
24952014-06-02 Andrew MacLeod <amacleod@redhat.com>
2496
2497 * c-decl.c: Include builtins.h.
2498 * c-parser.c: Likewise.
2499
5c1bc275
MP
25002014-05-27 Marek Polacek <polacek@redhat.com>
2501
2502 PR c/56724
2503 * c-typeck.c (convert_arguments): Get location of a parameter. Change
2504 error and warning calls to error_at and warning_at. Pass location of
2505 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
2506 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
2507 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
2508
97563bc8
IZ
25092014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
2510
2511 PR c/61191
2512 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
2513 function parameters.
2514
aede2c10
JH
25152014-05-23 Jan Hubicka <hubicka@ucw.cz>
2516
2517 * c-decl.c (merge_decls): Preserve symtab node pointers.
2518 (duplicate_decls): Free new decl.
2519
edbba2ce
TS
25202014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2521
f3316c6d
TS
2522 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
2523 initialization.
2524
edbba2ce
TS
2525 * c-parser.c (c_parser_omp_target): Return bool values.
2526
68c81f24
TS
25272014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2528
2529 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
2530 num_teams_loc variable to num_thread_limit_loc.
2531
632f2871
RS
25322014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2533
2534 * c-array-notation.c (expand_array_notations): Use void_node
2535 instead of void_zero_node.
2536
766090c2
TS
25372014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2538
2539 * c-decl.c (finish_struct): Adjust.
2540 (finish_enum): Likewise.
2541 (bind): Adjust.
2542 (record_inline_static): Likewise.
2543 (push_scope): Likewise.
2544 (make_label): Likewise.
2545 (lookup_label_for_goto): Likewise.
2546 (finish_struct): Likewise.
2547 (finish_enum): Likewise.
2548 (store_parm_decls): Likewise.
2549 (c_push_function_context): Likewise.
2550 * c-lang.h: Remove usage of variable_size gty attribute.
2551 * c-parser.c (c_parse_init): Adjust.
2552 (c_parse_file): Likewise.
2553
2b107f6b
MP
25542014-05-13 Marek Polacek <polacek@redhat.com>
2555
2556 PR c/61162
2557 * c-typeck.c (convert_for_assignment): Pass location to
2558 WARN_FOR_ASSIGNMENT instead of input_location.
2559
d033409e
MP
25602014-05-10 Marek Polacek <polacek@redhat.com>
2561
2562 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
2563 maybe_warn_string_init.
2564 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
2565 maybe_warn_string_init.
2566 * c-tree.h (maybe_warn_string_init): Update declaration.
2567 * c-typeck.c (maybe_warn_string_init): Add location parameter.
2568 Call pedwarn_init with loc instead of with input_location.
2569 (digest_init): Pass init_loc to maybe_warn_string_init.
2570 (pop_init_level): Call pedwarn_init with loc instead of with
2571 input_location.
2572 (set_init_index): Likewise.
2573 (process_init_element): Likewise.
2574
ea58ef42
MP
25752014-05-09 Marek Polacek <polacek@redhat.com>
2576
2577 PR c/61096
2578 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
2579 (c_parser_initelt): Pass location to set_init_label. Pass array index
2580 location to set_init_index.
2581 * c-tree.h (push_init_level): Update declaration.
2582 (pop_init_level): Likewise.
2583 (set_init_index): Likewise.
2584 (set_init_label): Likewise.
2585 * c-typeck.c (error_init): Add location parameter. Call error_at
2586 instead of error.
2587 (digest_init): Pass init_loc to error_init.
2588 (really_start_incremental_init):
2589 (push_init_level): Add location parameter. Pass loc to pop_init_level
2590 and error_init.
2591 (pop_init_level): Likewise.
2592 (set_designator): Add location parameter. Pass loc to pop_init_level,
2593 push_init_level, and error_init.
2594 (set_init_index): Add location parameter. Pass loc to error_init and
2595 set_designator.
2596 (set_init_label): Likewise.
2597 (output_init_element): Pass loc to error_init.
2598 (process_init_element): Pass loc to error_init, pop_init_level,
2599 pedwarn_init, and push_init_level.
2600
661a0813
MP
26012014-05-09 Marek Polacek <polacek@redhat.com>
2602
2603 PR c/50459
2604 * c-parser.c (c_parser_attributes): Parse the arguments as an
2605 expression-list if the attribute takes identifier.
2606
2793eeab
MP
26072014-05-08 Marek Polacek <polacek@redhat.com>
2608
2609 PR c/61053
2610 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
2611 TYPE_ALIGN_UNIT.
2612
f827930a
MP
26132014-05-08 Marek Polacek <polacek@redhat.com>
2614
2615 PR c/61077
2616 * c-decl.c (start_function): Warn for _Atomic-qualified return type
2617 of main.
2618
1d60af08
KZ
26192014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2620 Mike Stump <mikestump@comcast.net>
2621 Richard Sandiford <rdsandiford@googlemail.com>
2622
2623 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
2624 (finish_enum): Use wide-int interfaces.
2625 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
2626 * c-typeck.c (build_c_cast): Likewise.
2627 (set_nonincremental_init_from_string): Likewise.
2628 (c_tree_equal): Likewise.
2629
a0e24419
MP
26302014-05-02 Marek Polacek <polacek@redhat.com>
2631
2632 PR c/25801
2633 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
2634 Return size_one_node when the type is not complete.
2635 (pointer_diff): Remove comment.
2636 (build_unary_op): Improve error messages.
2637
19fc9faa
MP
26382014-05-02 Marek Polacek <polacek@redhat.com>
2639
2640 * c-typeck.c (c_finish_return): Separate warning_at calls.
2641
63bc4e87
MP
26422014-05-02 Marek Polacek <polacek@redhat.com>
2643
2644 * c-tree.h (error_init): Remove declaration.
2645 (pedwarn_init): Likewise.
2646 * c-typeck.c (error_init): Make static and move above.
2647 (pedwarn_init): Likewise.
2648 (warning_init): Move above.
2649 (maybe_warn_string_init): Likewise.
2650
4bd2511b
JL
26512014-05-01 Jeff Law <law@redhat.com>
2652
2653 Revert:
2654
2655 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2656 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
2657 avoid goto.
2658
6a358dcb
MP
26592014-05-02 Marek Polacek <polacek@redhat.com>
2660
2661 PR c/60784
2662 * c-typeck.c (push_init_level): Set constructor_designated to
2663 p->designated for structures.
2664
ae5ebda4
MP
26652014-05-01 Marek Polacek <polacek@redhat.com>
2666
2667 PR c/60915
2668 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
2669 function-definition has an attribute after the declarator.
2670
96b40f8d
MP
26712014-05-01 Marek Polacek <polacek@redhat.com>
2672
2673 PR c/60257
2674 * c-typeck.c (warning_init): Add location_t parameter. Call
2675 warning_at instead of warning.
2676 (push_init_level): Pass input_location to warning_init.
2677 (add_pending_init): Add location_t parameter. Pass loc to
2678 warning_init.
2679 (set_nonincremental_init): Pass input_location to add_pending_init.
2680 (set_nonincremental_init_from_string): Likewise.
2681 (output_init_element): Pass loc to warning_init and to
2682 add_pending_init.
2683
32e00768
MP
26842014-05-01 Marek Polacek <polacek@redhat.com>
2685
2686 PR c/43395
2687 * c-typeck.c (c_finish_return): Distinguish between label and variable
2688 when warning about returning local address.
2689
c9379ce2
MP
26902014-05-01 Marek Polacek <polacek@redhat.com>
2691
2692 PR c/29467
2693 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
2694 in C89 mode.
2695
d00887e8
MP
26962014-05-01 Marek Polacek <polacek@redhat.com>
2697
2698 PR c/43245
2699 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
2700 instead of 0 to WARN_FOR_QUALIFIERS.
2701
5436fa2e
MP
27022014-05-01 Marek Polacek <polacek@redhat.com>
2703
2704 PR c/56989
2705 * c-typeck.c (default_conversion): Use better location for
2706 error call.
2707
f8ed5150
MP
27082014-04-30 Marek Polacek <polacek@redhat.com>
2709
2710 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2711 also when SANITIZE_FLOAT_DIVIDE is on.
2712
8337d1db
MP
27132014-04-30 Marek Polacek <polacek@redhat.com>
2714
2715 PR c/60139
2716 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
2717 and pedwarn_init. Use loc insted of input_location.
2718
c4bdc42f
MP
27192014-04-30 Marek Polacek <polacek@redhat.com>
2720
2721 PR c/60351
2722 * c-typeck.c (build_binary_op): Use location when warning about
2723 shift count.
2724
45484dcf
MP
27252014-04-25 Marek Polacek <polacek@redhat.com>
2726
2727 PR c/18079
2728 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
2729 always_inline/noinline and hot/cold attributes.
2730
34cf811f
MP
27312014-04-25 Marek Polacek <polacek@redhat.com>
2732
2733 PR c/60114
2734 * c-parser.c (c_parser_initelt): Pass input_location to
2735 process_init_element.
2736 (c_parser_initval): Pass loc to process_init_element.
2737 * c-tree.h (process_init_element): Adjust declaration.
2738 * c-typeck.c (push_init_level): Pass input_location to
2739 process_init_element.
2740 (pop_init_level): Likewise.
2741 (set_designator): Likewise.
2742 (output_init_element): Add location_t parameter. Pass loc to
2743 digest_init.
2744 (output_pending_init_elements): Pass input_location to
2745 output_init_element.
2746 (process_init_element): Add location_t parameter. Pass loc to
2747 output_init_element.
2748
42056eac
JJ
27492014-04-24 Jakub Jelinek <jakub@redhat.com>
2750
2751 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
2752 atomic-clause, allow comma in between atomic-clause and
2753 seq_cst.
2754
e162a134
JJ
27552014-04-22 Jakub Jelinek <jakub@redhat.com>
2756
2757 PR c/59073
2758 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
2759 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2760
2f6babac
IZ
27612014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
2762
2763 PR middle-end/60469
2764 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2765 create_tmp_var instead build_decl for creating temps.
2766 (build_array_notation_expr): Likewise.
2767 (fix_conditional_array_notations_1): Likewise.
2768 (fix_array_notation_expr): Likewise.
2769 (fix_array_notation_call_expr): Likewise.
2770
8edbfaa6
JJ
27712014-03-28 Jakub Jelinek <jakub@redhat.com>
2772
2773 PR c++/60689
2774 * c-tree.h (c_build_function_call_vec): New prototype.
2775 * c-typeck.c (build_function_call_vec): Don't call
2776 resolve_overloaded_builtin here.
2777 (c_build_function_call_vec): New wrapper function around
2778 build_function_call_vec. Call resolve_overloaded_builtin here.
2779 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
2780 Call c_build_function_call_vec instead of build_function_call_vec.
2781 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2782 * c-decl.c (finish_decl): Likewise.
2783
7485aeea
MLI
27842014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2785
2786 PR c/55383
2787 * c-typeck.c: Use correct format string in cast-qual warning
2788
b17a8b07
TS
27892014-03-07 Thomas Schwinge <thomas@codesourcery.com>
2790
2791 * c-decl.c (c_decl_attributes): Use
2792 lang_hooks.types.omp_mappable_type.
2793 * c-typeck.c (c_finish_omp_clauses): Likewise.
2794
3af9c5e9
MP
27952014-03-06 Marek Polacek <polacek@redhat.com>
2796
2797 PR c/60197
2798 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
2799 of checking tree code.
2800
1c9f5f33
PK
28012014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2802
2803 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
2804 (c_parser_parameter_declaration): Likewise.
2805
cc28fc7f
MP
28062014-02-19 Marek Polacek <polacek@redhat.com>
2807
2808 PR c/60195
2809 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
2810 Call mark_exp_read on exp.value.
2811 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
2812 TREE_ADDRESSABLE on old instead of val.
2813 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
2814
b581c05c
PK
28152014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2816
2817 * c-parser.c (c_parser_get_builtin_args): Replace calls to
2818 C_EXPR_APPEND by vec_safe_push.
2819 * c-tree.h (C_EXPR_APPEND): Remove.
2820
81e5eca8
MP
28212014-01-31 Marek Polacek <polacek@redhat.com>
2822
2823 PR c/59963
2824 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
2825 build_function_call_vec.
2826 (build_function_call): Likewise.
2827 (build_atomic_assign): Likewise.
2828 (build_function_call_vec): Add arg_loc parameter. Use it.
2829 (convert_arguments): Likewise.
2830 (convert_for_assignment): Rename rhs_loc to expr_loc.
2831 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
2832 (c_parser_objc_keywordexpr): Likewise.
2833 (c_parser_postfix_expression_after_primary): Call
2834 build_function_call_vec with expr_loc rather than op_loc.
2835 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
2836 build_function_call_vec.
2837 (c_parser_expr_list): Add locations parameter. Fill it with locations
2838 of function arguments.
2839 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
2840
68fca595
MP
28412014-01-30 Marek Polacek <polacek@redhat.com>
2842
2843 PR c/59940
2844 * c-typeck.c (build_function_call_vec): Use loc parameter.
2845 (convert_arguments): Add location parameter. Use it.
2846 (ep_convert_and_check): Likewise.
2847 (build_atomic_assign): Adjust convert_for_assignment call.
2848 (build_modify_expr): Likewise.
2849 (digest_init): Likewise.
2850 (c_finish_return): Likewise.
2851 (build_conditional_expr): Adjust ep_convert_and_check calls.
2852 (convert_for_assignment): Add rhs_loc parameter. Use it.
2853 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
2854 calls.
2855
fa337f3a
RB
28562014-01-30 Richard Biener <rguenther@suse.de>
2857
2858 PR c/59905
2859 * c-typeck.c (build_function_call_vec): Do not replace calls
2860 to a function via an incompatible type with a runtime abort.
2861
b72271b9
BI
28622014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
2863
2864 * c-parser.c (c_parser_declaration_or_fndef): Replaced
2865 flag_enable_cilkplus with flag_cilkplus.
2866 (c_parser_direct_declarator_inner): Likewise.
2867 (c_parser_attribute_any_word): Likewise.
2868 (c_parser_attributes): Likewise.
2869 (c_parser_compound_statement): Likewise.
2870 (c_parser_statement_after_labels): Likewise.
2871 (c_parser_if_statement): Likewise.
2872 (c_parser_switch_statement): Likewise.
2873 (c_parser_do_statement): Likewise.
2874 (c_parser_for_statement): Likewise.
2875 (c_parser_unary_expression): Likewise.
2876 (c_parser_postfix_expression): Likewise.
2877 (c_parser_postfix_expression_after_primary): Likewise.
2878 (c_parser_postfix_expression_after_primary): Likewise.
2879 (c_parser_omp_clause_name): Likewise.
2880 (c_finish_omp_declare_simd): Likewise.
2881 (c_parser_cilk_verify_simd): Likewise.
2882 * c-typeck.c (build_array_ref): Likewise.
2883 (build_function_call_vec): Likewise.
2884 (convert_arguments): Likewise.
2885 (build_compound_expr): Likewise.
2886 (c_finish_return): Likewise.
2887 (c_finish_if_stmt): Likewise.
2888 (c_finish_loop): Likewise.
2889 (build_binary_op): Likewise.
2890
393e8e8b
MP
28912014-01-23 Marek Polacek <polacek@redhat.com>
2892
2893 PR c/59846
2894 * c-typeck.c (parser_build_binary_op): Use location instead of
2895 input_location.
2896 (build_binary_op): Pass location to shorten_compare.
2897
f04dda30
MP
28982014-01-23 Marek Polacek <polacek@redhat.com>
2899
2900 PR c/58346
2901 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
2902 an empty aggregate.
2903
789eadcd
MP
29042014-01-23 Marek Polacek <polacek@redhat.com>
2905
2906 PR c/59871
2907 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
2908 of a comma expression.
2909 (emit_side_effect_warnings): Likewise.
2910
40f14e9f
BI
29112014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2912
2913 PR c/59825
2914 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
2915 function to use walk_tree and moved a lot of its functionality to
2916 expand_array_notations.
2917 (expand_array_notations): New function.
2918
74558dd9
BI
29192014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2920
2921 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
2922 attribute an attribute without value.
2923
652fea39
JJ
29242014-01-23 Jakub Jelinek <jakub@redhat.com>
2925
2926 PR middle-end/58809
2927 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
2928 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
2929
f34f1c87
MP
29302014-01-22 Marek Polacek <polacek@redhat.com>
2931
2932 PR c/59891
2933 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
2934 of remove_c_maybe_const_expr on op1 and op2.
2935
241f845a
JJ
29362014-01-15 Jakub Jelinek <jakub@redhat.com>
2937
2938 PR c/58943
2939 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
2940 effects, preevaluate rhs using SAVE_EXPR first.
2941
9a74f20c
BI
29422014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
2943
2944 PR c++/59631
2945 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
2946 statements with if-elseif statements.
2947
96066ce1
MP
29482014-01-06 Marek Polacek <polacek@redhat.com>
2949
2950 PR c/57773
2951 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
2952 defined bit-field types only in ISO C.
2953
23a5b65a
RS
29542014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2955
2956 Update copyright years
2957
f9030485
RS
29582014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2959
2960 * c-array-notation.c: Use the standard form for the copyright notice.
2961
41958c28
BI
29622013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
2963
2964 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
2965 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
2966 field in parser is not empty. If not-empty, call the function
2967 c_parser_finish_omp_declare_simd.
2968 (c_parser_cilk_clause_vectorlength): Modified function to be shared
2969 between SIMD-enabled functions and #pragma simd. Added new parameter.
2970 (c_parser_cilk_all_clauses): Modified the usage of the function
2971 c_parser_cilk_clause_vectorlength as mentioned above.
2972 (c_parser_cilk_simd_fn_vector_attrs): New function.
2973 (c_finish_cilk_simd_fn_tokens): Likewise.
2974 (is_cilkplus_vector_p): Likewise.
2975 (c_parser_omp_clause_name): Added checking for "vectorlength,"
2976 "nomask," and "mask" strings in clause name.
2977 (c_parser_omp_all_clauses): Added 3 new case statements:
2978 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
2979 PRAGMA_CILK_CLAUSE_NOMASK.
2980 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
2981 check for vector attribute and if so call the function
2982 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
2983 called the function c_finish_cilk_simd_fn_tokens.
2984 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
2985 parser field is non-empty. If so, parse them as you would parse
2986 the omp declare simd pragma.
2987 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
2988 Added a check when step is a parameter and flag it as error.
2989 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
2990 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
2991 pragma_omp_clause.
2992
cef0fd0e
TS
29932013-12-17 Thomas Schwinge <thomas@codesourcery.com>
2994
2995 * c-parser.c (c_parser_omp_parallel): Fix description.
2996
12893402
BI
29972013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
2998
2999 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
3000 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3001 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
3002 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
3003
296674db
JM
30042013-12-04 Joseph Myers <joseph@codesourcery.com>
3005
3006 PR c/52023
3007 * c-parser.c (c_parser_alignas_specifier): Use
3008 c_sizeof_or_alignof_type instead of c_alignof.
3009 (c_parser_alignof_expression): Likewise, with min_alignof
3010 parameter depending on alignof spelling used.
3011
edd28054
MP
30122013-12-04 Marek Polacek <polacek@redhat.com>
3013
3014 PR c/54113
3015 * c-decl.c (start_function): Don't warn for missing prototype for
3016 inline functions.
3017
da0fc454
MP
30182013-12-03 Marek Polacek <polacek@redhat.com>
3019
3020 PR c/59351
3021 * c-decl.c (build_compound_literal): Allow compound literals with
3022 empty initial value.
3023
4c2ecab0
JM
30242013-12-02 Joseph Myers <joseph@codesourcery.com>
3025
3026 PR c/58235
3027 * c-typeck.c (build_modify_expr): Diagnose assignment to
3028 expression with array type.
3029
340baef7
JM
30302013-11-29 Joseph Myers <joseph@codesourcery.com>
3031
3032 PR c/42262
3033 * c-typeck.c (process_init_element): Do not treat a string as
3034 initializing a whole array when used with a designator for an
3035 individual element.
3036
6763b9f7
JM
30372013-11-29 Joseph Myers <joseph@codesourcery.com>
3038
3039 PR c/57574
3040 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
3041 an inline function following a static declaration.
3042
e7bd1de1
JJ
30432013-11-28 Jakub Jelinek <jakub@redhat.com>
3044
3045 PR c/59310
3046 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
3047 to p_name before calling c_parser_omp_teams instead of after.
3048 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
3049 argument. Remove unused p_name variable.
3050
0136f8f0
AH
30512013-11-27 Aldy Hernandez <aldyh@redhat.com>
3052 Jakub Jelinek <jakub@redhat.com>
3053
3054 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
3055 external_scope is NULL.
3056
241b71bb
TV
30572013-11-27 Tom de Vries <tom@codesourcery.com>
3058 Marc Glisse <marc.glisse@inria.fr>
3059
3060 PR c++/59032
3061 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
3062
2fb9a547
AM
30632013-11-22 Andrew MacLeod <amacleod@redhat.com>
3064
3065 * c-typeck.c: Add required include files from gimple.h.
3066
8400e75e
DM
30672013-11-22 David Malcolm <dmalcolm@redhat.com>
3068
3069 * c-decl.c (define_label, shadow_tag_warned)
3070 (check_bitfield_type_and_width, grokdeclarator, grokparms,
3071 store_parm_decls_newstyle, store_parm_decls_oldstyle)
3072 (declspecs_add_type): Remove use of in_system_header macro.
3073 * c-parser.c (c_parser_unary_expression): Likewise.
3074 * c-typeck.c (store_init_value, process_init_element)
3075 (c_start_case): Likewise.
3076
3077 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
3078 macro.
3079
3080 * c-parser.c (c_parser_set_source_position_from_token): Remove
3081 reference to in_system_header from comment.
3082
386b1f1f
RS
30832013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3084
3085 * c-decl.c (grokdeclarator): Update comment to refer to
3086 tree_to_[su]hwi rather than tree_low_cst.
3087
ae7e9ddd
RS
30882013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3089
3090 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
3091 tree_to_uhwi throughout.
3092
9439e9a1
RS
30932013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3094
3095 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
3096 throughout.
3097
9541ffee
RS
30982013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3099
3100 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
3101 throughout.
3102
c02065fc
AH
31032013-11-15 Aldy Hernandez <aldyh@redhat.com>
3104
3105 * c-parser.c (c_parser_cilk_simd): New.
3106 (c_parser_cilk_verify_simd): New.
3107 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
3108 (c_parser_omp_for_loop): Add case for NE_EXPR.
3109 Set c_break_label for CILK_SIMD.
3110 (c_parser_cilk_clause_vectorlength): New.
3111 (c_parser_cilk_clause_linear): New.
3112 (c_parser_cilk_clause_name): New.
3113 (c_parser_cilk_all_clauses): New.
3114 * c-typeck.c (build_unary_op): Pass location argument to
3115 readonly_error.
3116 (build_modify_expr): Same.
3117 (build_asm_expr): Same.
3118 (c_finish_bc_stmt): Error on break/continue in loops.
3119
18f429e2
AM
31202013-11-14 Andrew MacLeod <amacleod@redhat.com>
3121
3122 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
3123
d8a2d370
DN
31242013-11-14 Diego Novillo <dnovillo@google.com>
3125
3126 * c-decl.c: Include print-tree.h.
3127 Include stor-layout.h.
3128 Include varasm.h.
3129 Include attribs.h.
3130 Include stringpool.h.
3131 * c-lang.c: Include fold-const.h.
3132 * c-parser.c: Include stringpool.h.
3133 Include attribs.h.
3134 Include stor-layout.h.
3135 Include varasm.h.
3136 Include trans-mem.h.
3137 * c-typeck.c: Include stor-layout.h.
3138 Include trans-mem.h.
3139 Include varasm.h.
3140 Include stmt.h.
3141
38b7bc7f
JM
31422013-11-13 Joseph Myers <joseph@codesourcery.com>
3143
3144 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
3145 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
3146 __auto_type.
3147 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
3148 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
3149 RID_AUTO_TYPE.
3150 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
3151 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
3152 (c_parser_declarator, c_parser_direct_declarator_inner)
3153 (c_parser_parameter_declaration, c_parser_type_name): All callers
3154 changed.
3155 (c_parser_declaration_or_fndef): Handle declarations with type
3156 determined from the initializer.
3157
45b0be94
AM
31582013-11-12 Andrew MacLeod <amacleod@redhat.com>
3159
18f429e2 3160 * c-typeck.c: Include gimplify.h.
45b0be94 3161
582d9b50
JM
31622013-11-12 Joseph Myers <joseph@codesourcery.com>
3163
3164 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
3165 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
3166 comment.
3167 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
3168 or _Thread_local as appropriate in diagnostics.
3169 (build_null_declspecs): Initialize ret->thread_gnu_p.
3170 (declspecs_add_scspec): Handle either __thread or _Thread_local
3171 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
3172 pedantic. Do not disallow _Thread_local extern and _Thread_local
3173 static.
3174
267bac10
JM
31752013-11-07 Joseph Myers <joseph@codesourcery.com>
3176 Andrew MacLeod <amacleod@redhat.com>
3177
3178 * c-aux-info.c (gen_type): Handle atomic qualifier.
3179 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
3180 qualifiers when compating types.
3181 (shadow_tag_warned): Handle atomic_p in declspecs.
3182 (quals_from_declspecs): Likewise.
3183 (start_decl): Use c_type_promotes_to when promoting argument
3184 types.
3185 (grokdeclarator): Handle _Atomic.
3186 (get_parm_info): Diagnose any qualifier on "void" as only
3187 parameter.
3188 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
3189 comparing types. Use c_type_promotes_to when promoting argument
3190 types.
3191 (finish_function): Use c_type_promotes_to when promoting argument
3192 types.
3193 (build_null_declspecs): Handle atomic_p in declspecs.
3194 (declspecs_add_qual): Handle RID_ATOMIC.
3195 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
3196 (c_token_starts_declspecs): Handle RID_ATOMIC.
3197 (c_parser_declspecs): Handle atomic type specifiers and
3198 qualifiers.
3199 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
3200 from types of expressions with atomic type.
3201 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
3202 (c_parser_attribute_any_word): Handle RID_ATOMIC.
3203 (c_parser_initializer, c_parser_initelt, c_parser_initval)
3204 (c_parser_statement_after_labels, c_parser_switch_statement)
3205 (c_parser_for_statement, c_parser_expr_no_commas)
3206 (c_parser_conditional_expression, c_parser_binary_expression)
3207 (c_parser_cast_expression, c_parser_unary_expression)
3208 (c_parser_postfix_expression)
3209 (c_parser_postfix_expression_after_primary, c_parser_expression):
3210 Use convert_lvalue_to_rvalue.
3211 (c_parser_expression_conv, c_parser_expr_list): Document
3212 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
3213 (c_parser_objc_synchronized_statement): Use
3214 convert_lvalue_to_rvalue.
3215 (c_parser_objc_selector): Handle RID_ATOMIC.
3216 (c_parser_objc_receiver, c_parser_array_notation): Use
3217 convert_lvalue_to_rvalue.
3218 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
3219 _Atomic (type-name).
3220 (struct c_declspecs): Add atomic_p field.
3221 (convert_lvalue_to_rvalue): Declare.
3222 * c-typeck.c (c_type_promotes_to): Promote atomic types to
3223 corresponding atomic types.
3224 (qualify_type): Don't add _Atomic qualifiers from second argument.
3225 (comp_target_types): Do not allow _Atomic mismatches.
3226 (type_lists_compatible_p): Do not remove atomic qualifiers when
3227 comparing types.
3228 (really_atomic_lvalue, convert_lvalue_to_rvalue)
3229 (build_atomic_assign): New functions.
3230 (build_unary_op): Use build_atomic_assign for atomic increment and
3231 decrement.
3232 (build_conditional_expr): Do not treat _Atomic void as a qualified
3233 version of void.
3234 (build_modify_expr): Use build_atomic_assign for atomic LHS.
3235 (find_anonymous_field_with_type, convert_to_anonymous_field)
3236 (convert_for_assignment): Do not remove atomic qualifiers when
3237 comparing types.
3238 (digest_init): Do not accept initialization of arrays of atomic
3239 elements by string constants.
3240 (build_asm_expr): Use convert_lvalue_to_rvalue.
3241 (build_binary_op): Do not treat _Atomic void as a qualified
3242 version of void.
3243
0c249d4b
DD
32442013-11-06 DJ Delorie <dj@redhat.com>
3245
3246 * c-decl.c (locate_old_decl): If a previous conflicting decl is
3247 both explicit and builtin, print the location of the explicit one.
3248
6d7f7e0a
TB
32492013-11-05 Tobias Burnus <burnus@net-b.de>
3250
3251 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
3252 c_parser_omp_distribute, c_parser_omp_teams,
3253 c_parser_omp_target, c_parser_omp_declare): Handle
3254 -fopenmp-simd.
3255
b906f4ca
MP
32562013-11-03 Marek Polacek <polacek@redhat.com>
3257
3258 * c-decl.c (grokdeclarator): Add VLA instrumentation.
3259
ee1d5a02
JJ
32602013-11-01 Jakub Jelinek <jakub@redhat.com>
3261
3262 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
3263 check_dup_generic at the end, unless remove is true.
3264 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
3265 remove = true;.
3266 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
3267
5a9785fb
JJ
32682013-10-31 Jakub Jelinek <jakub@redhat.com>
3269
3270 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
3271 with decl that is not pointer nor array.
3272
939b37da
BI
32732013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
3274
3275 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
3276 a spawning function is found.
3277 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
3278 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
3279 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3280 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
3281 case.
3282 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
3283 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
3284 expr.
3285 (c_finish_return): Added a check to reject _Cilk_spawn in return
3286 expression.
3287 (build_cilk_spawn): New function.
3288 (build_cilk_sync): Likewise.
3289 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
3290
d4af74d4
TB
32912013-10-27 Tobias Burnus <burnus@net-b.de>
3292
3293 PR other/33426
3294 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
3295 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
3296 (c_parser_statement_after_labels): Update calls.
3297
d73749df 32982013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
3299
3300 PR other/33426
3301 * c-parser.c (c_parser_pragma, c_parser_for_statement):
3302 Handle PRAGMA_IVDEP.
3303 (c_parser_statement_after_labels): Update call.
3304
f28aa681
MP
33052013-10-24 Marek Polacek <polacek@redhat.com>
3306
3307 * c-parser.c (c_parser_struct_declaration): Add a comment.
3308 (c_parser_declarator): Don't allow _Alignas here.
3309
0645c1a2
AM
33102013-10-17 Andrew MacLeod <amacleod@redhat.com>
3311
3312 * c-parser.c: Include omp-low.h.
3313 * c-typeck.c: Likewise.
3314
568a31f2
MP
33152013-10-17 Marek Polacek <polacek@redhat.com>
3316
3317 PR c/58267
3318 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
3319 Document syntax of the array-declarator.
3320 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
3321 are not permitted.
3322 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
3323 (c_parser_struct_declaration): Likewise.
3324 (c_parser_declarator): Likewise.
3325 (c_parser_direct_declarator_inner): Likewise.
3326 (c_parser_parameter_declaration): Likewise.
3327 (c_parser_type_name): Likewise.
3328
acf0174b
JJ
33292013-10-11 Jakub Jelinek <jakub@redhat.com>
3330
3331 * c-lang.h (current_omp_declare_target_attribute): New extern
3332 decl.
3333 * c-parser.c: Include c-lang.h.
3334 (struct c_parser): Change tokens to c_token *.
3335 Add tokens_buf field. Change tokens_avail type to unsigned int.
3336 (c_parser_consume_token): If parser->tokens isn't
3337 &parser->tokens_buf[0], increment parser->tokens.
3338 (c_parser_consume_pragma): Likewise.
3339 (enum pragma_context): Add pragma_struct and pragma_param.
3340 (c_parser_external_declaration): Adjust
3341 c_parser_declaration_or_fndef caller.
3342 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
3343 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
3344 Adjust recursive call.
3345 (c_parser_struct_or_union_specifier): Use pragma_struct instead
3346 of pragma_external.
3347 (c_parser_parameter_declaration): Use pragma_param instead of
3348 pragma_external.
3349 (c_parser_compound_statement_nostart, c_parser_label,
3350 c_parser_for_statement): Adjust
3351 c_parser_declaration_or_fndef callers.
3352 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
3353 it through to c_parser_conditional_expression.
3354 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
3355 pass it through to c_parser_binary_expression. Adjust recursive
3356 call.
3357 (c_parser_binary_expression): Remove prec argument, add
3358 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
3359 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
3360 binop matches it, use build2 instead of parser_build_binary_op.
3361 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
3362 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
3363 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
3364 Handle pragma_struct and pragma_param the same as pragma_external.
3365 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
3366 (c_parser_omp_variable_list): Parse array sections for
3367 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
3368 (c_parser_omp_clause_collapse): Fully fold collapse expression.
3369 (c_parser_omp_clause_reduction): Handle user defined reductions.
3370 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
3371 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
3372 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
3373 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
3374 c_parser_omp_clause_depend, c_parser_omp_clause_map,
3375 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
3376 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
3377 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
3378 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
3379 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
3380 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
3381 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
3382 (c_parser_omp_for_loop): Add CODE argument, pass it through
3383 to c_finish_omp_for. Change last argument to cclauses,
3384 and adjust uses to grab parallel clauses from the array of all
3385 the split clauses. Adjust c_parser_binary_expression,
3386 c_parser_declaration_or_fndef and c_finish_omp_for callers.
3387 (omp_split_clauses): New function.
3388 (c_parser_omp_simd): New function.
3389 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
3390 Allow the function to be called also when parsing combined constructs,
3391 and call c_parser_omp_simd when parsing for simd.
3392 (c_parser_omp_sections_scope): If section-sequence doesn't start with
3393 #pragma omp section, require exactly one structured-block instead of
3394 sequence of statements.
3395 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
3396 Allow the function to be called also when parsing combined constructs.
3397 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
3398 Allow the function to be called also when parsing combined
3399 constructs.
3400 (c_parser_omp_taskgroup, c_parser_omp_cancel,
3401 c_parser_omp_cancellation_point, c_parser_omp_distribute,
3402 c_parser_omp_teams, c_parser_omp_target_data,
3403 c_parser_omp_target_update, c_parser_omp_target,
3404 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
3405 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
3406 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
3407 (c_parser_omp_construct): Add p_name and mask vars. Handle
3408 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
3409 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
3410 and c_parser_omp_sections callers.
3411 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
3412 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
3413 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
3414 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
3415 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
3416 OMP_CLAUSE_DEPEND.
3417 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
3418 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
3419 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
3420 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
3421 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
3422 * c-typeck.c: Include tree-inline.h.
3423 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
3424 handle_omp_array_sections_1, handle_omp_array_sections,
3425 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
3426 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
3427 user defined reductions.
3428 (c_tree_equal): New function.
3429 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
3430 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
3431 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
3432 c_check_omp_declare_reduction_r): New prototypes.
3433 * c-decl.c (current_omp_declare_target_attribute): New variable.
3434 (c_decl_attributes): New function.
3435 (start_decl, start_function): Use it instead of decl_attributes.
3436 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
3437 c_omp_reduction_decl, c_omp_reduction_lookup,
3438 c_check_omp_declare_reduction_r): New functions.
3439
0a6c2227
TT
34402013-09-25 Tom Tromey <tromey@redhat.com>
3441
3442 * Make-lang.in (c/gccspec.o): Remove.
3443 (CFLAGS-c/gccspec.o): New variable.
3444 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
3445 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
3446 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
3447
f3bc55f0
TT
34482013-09-25 Tom Tromey <tromey@redhat.com>
3449
3450 * Make-lang.in (c/gccspec.o): Don't use subshell.
3451
a24d975c
MP
34522013-09-18 Marek Polacek <polacek@redhat.com>
3453
3454 PR sanitize/58443
3455 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
3456 Remove unnecessary check.
3457
ce6923c5
MP
34582013-09-18 Marek Polacek <polacek@redhat.com>
3459
3460 PR sanitizer/58411
3461 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
3462 no_sanitize_undefined attribute.
3463
a1e51df9
KT
34642013-09-13 Kai Tietz <ktietz@redhat.com>
3465
3466 PR target/57848
3467 * c-decl.c (c_builtin_function_ext_scope): Remove
3468 wrong assumption that it is never called on prexisting
3469 symbol.
3470
0af94e6f
JR
34712013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
3472
3473 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
3474
20059c8b
GDR
34752013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3476
3477 * c-objc-common.c (c_tree_printer): Tidy.
3478
de5a5fa1
MP
34792013-08-30 Marek Polacek <polacek@redhat.com>
3480
3481 * c-typeck.c (build_binary_op): Add division by zero and shift
3482 instrumentation.
3483
2531a1d9 34842013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 3485 Joseph Myers <joseph@codesourcery.com>
2531a1d9 3486
6e2bcc98 3487 PR c/35649
2531a1d9
JR
3488 * c-typeck.c (c_common_type): Prefer double_type_node over
3489 other REAL_TYPE types with the same precision.
3490 (convert_arguments): Likewise.
3491
025311c4
GDR
34922013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3493
3494 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
3495 (c_initialize_diagnostics): Call a destructor for the early printer.
3496
da6ca2b5
GDR
34972013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3498
3499 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
3500 printer initialization.
3501
318cda85 35022013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 3503
318cda85
BI
3504 PR c/57490
3505 * c-array-notation.c (fix_conditional_array_notations_1): Added a
3506 check for truth values.
3507 (expand_array_notation_exprs): Added truth values case. Removed an
3508 unwanted else. Added for-loop to walk through subtrees in default
3509 case.
3510
b066401f
GDR
35112013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3512
3513 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
3514
fb48aadc
JM
35152013-07-23 Joseph Myers <joseph@codesourcery.com>
3516
3517 * c-parser.c (struct c_generic_association): Fix typo.
3518
433cc7b0
TT
35192013-07-23 Tom Tromey <tromey@redhat.com>
3520 Joseph Myers <joseph@codesourcery.com>
3521
3522 * c-parser.c (struct c_generic_association): New.
3523 (c_generic_association_d): New typedef.
3524 (c_parser_generic_selection): New function.
3525 (c_parser_postfix_expression): Handle RID_GENERIC.
3526
26d40c3d
JM
35272013-07-13 Jason Merrill <jason@redhat.com>
3528
3529 PR c++/57793
3530 * c-decl.c (finish_struct): Check for too-large class.
3531
ecdbd01a 35322013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
3533
3534 PR c/57821
3535 * c-typeck.c (set_init_index): When folding, check for index overflow.
3536
1141ed3f
BI
35372013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3538
3539 * c-parser.c (c_parser_array_notation): Removed rejection of array
3540 notations in an array of function pointers.
3541
713b46fa
BI
35422013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
3543
3544 * c-array-notation.c (make_triplet_val_inv): New function.
3545 (create_cmp_incr): Likewise.
3546 (create_array_refs): Likewise.
3547 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
3548 Also modularized common parts between functions and called the function.
3549 (build_array_notation_expr): Likewise.
3550 (fix_conditional_array_notations_1): Likewise.
3551 (fix_array_notation_expr): Likewise.
3552 (fix_array_notation_call_expr): Likewise.
3553
92f20202
MP
35542013-06-18 Marek Polacek <polacek@redhat.com>
3555
3556 PR c/57630
3557 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
3558
73a23b06
BI
35592013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
3560
3561 * c-array-notation.c (build_array_notation_expr): Reject array notation
3562 mismatch between LHS and RHS even inside a call_expr. Also, removed
3563 a couple while statements that were dead code.
3564
00b8517d
BI
35652013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
3566
3567 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
3568 excessive precision expressions in function parameters. Also removed
3569 couple unwanted while statements.
3570
1509bdda
BI
35712013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3572
3573 * c-array-notation.c (expand_array_notation_exprs): Added
3574 ARRAY_NOTATION_REF case.
3575
d60f1706
BI
35762013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3577
3578 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
3579 function to c-family/array-notation-common.c.
3580 (is_cilkplus_reduce_builtin): Likewise.
3581 (find_rank): Likewise.
3582 (extract_array_notation_exprs): Likewise.
3583 (replace_array_notations): Likewise.
3584 (find_inv_trees): Likewise.
3585 (replace_inv_trees): Likewise.
3586 (contains_array_notation_expr): Likewise.
3587 (find_correct_array_notation_type): Likewise.
3588 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
3589 (struct inv_list): Moved this to c-family/array-notation-common.c.
3590 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
3591
6d6efbb3
BI
35922013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
3593
3594 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
3595 reduction functions outside the for-loop. Added a check if the fundecl
3596 is non-NULL. Finally, removed an unwanted if-statement, and made the
3597 body unconditional.
3598
25c22937
BI
35992013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3600
3601 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
3602 condition of the if-statement matches the rank of else-block and then-
3603 block when array notations are used.
3604 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
3605 expression after the entire function body is parsed.
3606 (c_parser_expr_no_commas): Delayed creating array notation expressions
3607 to the end of function parsing.
3608 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
3609 whole if-statement instead of just the condition.
3610 (expand_array_notation_exprs): Added MODIFY_EXPR case.
3611
edd25645
BI
36122013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3613
3614 PR c/57474
3615 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
3616 array to NULL_TREE if they are unused. Also added a check for the
3617 field to be NULL before its fields are used in future.
3618
065ce7f1
RO
36192013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3620
3621 PR bootstrap/57450
3622 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
3623 (build_array_notation_expr): Likewise.
3624
36536d79
BI
36252013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3626
3627 * c-typeck.c (build_array_ref): Added a check to see if array's
3628 index is greater than one. If true, then emit an error.
3629 (build_function_call_vec): Exclude error reporting and checking
3630 for builtin array-notation functions.
3631 (convert_arguments): Likewise.
3632 (c_finish_return): Added a check for array notations as a return
3633 expression. If true, then emit an error.
3634 (c_finish_loop): Added a check for array notations in a loop
3635 condition. If true then emit an error.
3636 (lvalue_p): Added a ARRAY_NOTATION_REF case.
3637 (build_binary_op): Added a check for array notation expr inside
3638 op1 and op0. If present, we call another function to find correct
3639 type.
3640 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
3641 * c-parser.c (c_parser_compound_statement): Check if array
3642 notation code is used in tree, if so, then transform them into
3643 appropriate C code.
3644 (c_parser_expr_no_commas): Check if array notation is used in LHS
3645 or RHS, if so, then build array notation expression instead of
3646 regular modify.
3647 (c_parser_postfix_expression_after_primary): Added a check for
3648 colon(s) after square braces, if so then handle it like an array
3649 notation. Also, break up array notations in unary op if found.
3650 (c_parser_direct_declarator_inner): Added a check for array
3651 notation.
3652 (c_parser_compound_statement): Added a check for array notation in
3653 a stmt. If one is present, then expand array notation expr.
3654 (c_parser_if_statement): Likewise.
3655 (c_parser_switch_statement): Added a check for array notations in
3656 a switch statement's condition. If true, then output an error.
3657 (c_parser_while_statement): Similarly, but for a while.
3658 (c_parser_do_statement): Similarly, but for a do-while.
3659 (c_parser_for_statement): Similarly, but for a for-loop.
3660 (c_parser_unary_expression): Check if array notation is used in a
3661 pre-increment or pre-decrement expression. If true, then expand
3662 them.
3663 (c_parser_array_notation): New function.
3664 * c-array-notation.c: New file.
3665 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
3666
cd192ccc
MS
36672013-05-23 Mike Stump <mikestump@comcast.net>
3668
3669 * c-typeck.c (convert_for_assignment): Handle references to memory
3670 spaces better.
3671
427b248d
JM
36722013-05-16 Jason Merrill <jason@redhat.com>
3673
3674 * Make-lang.in (cc1$(exeext)): Use link mutex.
3675
44d90fe1
PC
36762013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3677
3678 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
3679 to simply use OPT_Wpointer_arith.
3680 (build_unary_op): Likewise.
3681
4e7d7b3d
JJ
36822013-04-03 Jakub Jelinek <jakub@redhat.com>
3683
3684 PR c/19449
3685 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
3686 argument. If set, or it temporarily for parsing of the first
3687 argument into force_folding_builtin_constant_p.
3688 (c_parser_postfix_expression): Adjust callers.
3689
839b422f
RB
36902013-03-21 Richard Biener <rguenther@suse.de>
3691
3692 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
3693 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
3694
2ee028f1
MP
36952013-02-12 Marek Polacek <polacek@redhat.com>
3696
3697 PR c/44938
3698 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
3699 origtypes to NULL.
3700
8824edff
JJ
37012013-01-24 Jakub Jelinek <jakub@redhat.com>
3702
3703 PR c/56078
3704 * c-typeck.c (set_nonincremental_init_from_string): If
3705 constructor_max_index is NULL, treat it as if tree_int_cst_lt
3706 returned false.
3707 (process_init_element): Likewise.
3708
eadd3d0d
JJ
37092012-12-20 Jakub Jelinek <jakub@redhat.com>
3710
3711 PR c++/55619
3712 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
3713 argument, don't call default_function_array_conversion
3714 nor c_fully_fold here.
3715 (c_parser_asm_statement): Adjust callers.
3716 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
3717 and outputs here, and call default_function_array_conversion
3718 on inputs that don't need to be addressable.
3719
f8a93a2e
JJ
37202012-12-18 Jakub Jelinek <jakub@redhat.com>
3721
3722 PR c/39464
3723 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
3724 warning require that both c_common_unsigned_type as well as
3725 c_common_signed_type is the same for both mvl and mvr types.
3726
9771b263
DN
37272012-11-16 Diego Novillo <dnovillo@google.com>
3728
3729 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
3730
3731 * c-common.c: Use new vec API in vec.h.
3732 * c-common.h: Likewise.
3733 * c-gimplify.c: Likewise.
3734 * c-pragma.c: Likewise.
3735 * c-pretty-print.c: Likewise.
3736 * c-pretty-print.h: Likewise.
3737 * c-semantics.c: Likewise.
3738 * c-decl.c: Likewise.
3739 * c-parser.c: Likewise.
3740 * c-tree.h: Likewise.
3741 * c-typeck.c: Likewise.
3742
880661a4
JW
37432012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
3744
3745 PR c++/54930
3746 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
3747
077d1abe
MLI
37482012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3749
3750 PR c/53066
3751 * c-decl.c (warn_if_shadowing): Do not warn if a variable
3752 shadows a function, unless the variable is a function or a
3753 pointer-to-function.
3754
3a785c97
JJ
37552012-10-12 Jakub Jelinek <jakub@redhat.com>
3756
3757 PR c/54381
3758 * c-parser.c (struct c_tree_loc_pair): Removed.
3759 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
3760 add location_t * and tree * arguments, fill in array of 3
3761 sizeof_arg trees and corresponding locs.
3762 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
3763 c_parser_expr_list callers.
3764 (c_parser_postfix_expression_after_primary): Likewise. Pass
3765 array of 3 sizeof_arg trees and locs (corresponding to first
3766 3 arguments) to sizeof_pointer_memaccess_warning.
3767
703c8606
LC
37682012-10-09 Lawrence Crowl <crowl@google.com>
3769
3770 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
3771 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
3772 hash table.
3773
5d9de0d0
PC
37742012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
3775
3776 PR c++/54194
3777 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
3778 call.
3779
a212e43f
MG
37802012-10-09 Marc Glisse <marc.glisse@inria.fr>
3781
3782 PR c++/54427
3783 * c-typeck.c: Include c-common.h.
3784 (enum stv_conv): Moved to c-common.h.
3785 (scalar_to_vector): Moved to c-common.c.
3786 (build_binary_op): Adapt to scalar_to_vector's new prototype.
3787 * Make-lang.in: c-typeck.c depends on c-common.h.
3788
3b78de56
AC
37892012-10-04 Arnaud Charlet <charlet@adacore.com>
3790
3791 * c-decl.c (c_write_global_declarations): Fix handling of
3792 -fdump-ada-spec*.
3793
78c60e3d
SS
37942012-09-30 Sharad Singhai <singhai@google.com>
3795
3796 * c-decl.c (c_write_global_declarations): Use a different method
3797 to determine if the dump has ben initialized.
3798
9f33203d
JM
37992012-09-14 Joseph Myers <joseph@codesourcery.com>
3800
3801 PR c/54552
3802 * c-typeck.c (c_cast_expr): When casting to a type requiring
3803 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
3804 c_fully_fold first.
3805
a27d595d
JM
38062012-09-14 Joseph Myers <joseph@codesourcery.com>
3807
3808 PR c/54103
3809 * c-typeck.c (build_unary_op): Pass original argument of
3810 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
3811 any C_MAYBE_CONST_EXPR, if it has integer operands.
3812 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
3813 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
3814 to c_objc_common_truthvalue_conversion, then remove any
3815 C_MAYBE_CONST_EXPR, if they have integer operands. Use
3816 c_objc_common_truthvalue_conversion not
3817 c_common_truthvalue_conversion.
3818 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
3819 call note_integer_operands for arguments with integer operands
3820 that are not integer constants.
3821
9feb29df
JJ
38222012-09-13 Jakub Jelinek <jakub@redhat.com>
3823
3824 PR c/54559
3825 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
3826 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
3827
d409320c
JJ
38282012-08-31 Jakub Jelinek <jakub@redhat.com>
3829
3830 PR c/54428
3831 * c-convert.c (convert): Don't call fold_convert_loc if
3832 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
3833 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
3834 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
3835
6265d07c
JJ
38362012-08-24 Jakub Jelinek <jakub@redhat.com>
3837
3838 PR c/54355
3839 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
3840 for nested and empty_ok arguments in the call to
3841 c_parser_declaration_or_fndef.
3842
1a4049e7
JJ
38432012-08-17 Jakub Jelinek <jakub@redhat.com>
3844
3845 * c-tree.h (c_last_sizeof_arg): Declare.
3846 * c-parser.c (struct c_tree_loc_pair): New type.
3847 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
3848 non-NULL.
3849 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
3850 (c_parser_postfix_expression_after_primary): Likewise. Call
3851 sizeof_pointer_memaccess_warning if needed.
3852 (sizeof_ptr_memacc_comptypes): New function.
3853 * c-typeck.c (c_last_sizeof_arg): New global variable.
3854 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
3855
0229aee9
UB
38562012-07-24 Uros Bizjak <ubizjak@gmail.com>
3857
3858 * c-lang.h (lang_decl): Add variable_size GTY option.
3859
7ee2468b
SB
38602012-07-16 Steven Bosscher <steven@gcc.gnu.org>
3861
3862 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
3863 * Make-lang.in: Fix dependencies.
3864
d4a10d0a
SB
38652012-06-29 Steven Bosscher <steven@gcc.gnu.org>
3866
3867 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
3868 and add language Makefile hooks.
3869 * config-lang.in: New file.
3870 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
3871 add the required "normal" config-lang.in rules.
3872 * c-lang.h: Moved from gcc/ to here.
3873 * c-tree.h: Likewise.
3874 * c-objc-common.c: Likewise.
3875 * c-objc-common.h: Likewise.
3876 * c-typeck.c: Likewise.
3877 * c-convert.c: Likewise.
3878 * c-lang.c: Likewise.
3879 * c-aux-info.c: Likewise.
3880 * c-errors.c: Likewise.
3881 * gccspec.c: Likewise.
3882 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
3883 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
3884\f
818ab71a 3885Copyright (C) 2012-2016 Free Software Foundation, Inc.
d4a10d0a
SB
3886
3887Copying and distribution of this file, with or without modification,
3888are permitted in any medium without royalty provided the copyright
3889notice and this notice are preserved.